Commit a18bae9e4b9db49b6d0378f0ba6d9b77751444a7
1 parent
a269cf07
Exists in
master
and in
28 other branches
ActionItem445: redirect back if login fail
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2065 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
app/controllers/public/account_controller.rb
test/functional/account_controller_test.rb
... | ... | @@ -39,9 +39,10 @@ class AccountControllerTest < Test::Unit::TestCase |
39 | 39 | end |
40 | 40 | |
41 | 41 | def test_should_fail_login_and_not_redirect |
42 | + @request.env["HTTP_REFERER"] = 'bli' | |
42 | 43 | post :login, :user => {:login => 'johndoe', :password => 'bad password'} |
43 | 44 | assert_nil session[:user] |
44 | - assert_response :success | |
45 | + assert_response :redirect | |
45 | 46 | end |
46 | 47 | |
47 | 48 | def test_should_allow_signup | ... | ... |