Displaying 1 result from an estimated 1 matches for "test_loggedout".
2005 Mar 06
3
question about testing
...= User.find_by_login "bob"
So now all the tests can successfully test actions that require a log
in. But, for security''s sake, I''d like to test that actions while
logged out, do in fact redirect to the login screen.
I originally wrote the test method like this:
def test_loggedout
@request.session["user"] = nil
process :new
assert_redirected_to :controller => ''account'', :action => ''login''
process :edit
assert_redirected_to :controller => ''account'', :action => ''login'...