Re: Integration testing of secured controller spring security
You need functional tests. Integration tests start up most of Grails, but there's no running web server (the requests and responses are mocks) so the servlet filters that handle access control aren't there.
Vladimir Havenchyk wrote
Hi, is there way to test secured access to controller from integration tests with spring security?
I have request map with secured url and role e.g. "/person/**", "ROLE_SUPER_ADMIN".
Now I want to test access for user with another role e.g. "ROLE_USER". Is it possible in integration tests or should I use functional tests instead?