How do I do functional tests on controller methods protected by before
filters, without using the soon-to-be-deprecated “follow_redirect”?
Say I have a method called index, filtered by check_login. If the
user is not logged in, they get redirected to the login method, which
logs them in and directs them to index. In my functional tests, I can
hit index like this:
post :login, :user => {login params}
follow_redirect
assertions
If I can’t use “follow_redirect”, how do I set up my tests so the
controller treats the test methods as logged in?