@@ -33,12 +33,12 class AccountControllerTest < ActionController::TestCase | |||||
33 |
|
33 | |||
34 | def test_login_should_redirect_to_back_url_param |
|
34 | def test_login_should_redirect_to_back_url_param | |
35 | # request.uri is "test.host" in test environment |
|
35 | # request.uri is "test.host" in test environment | |
36 |
post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http |
|
36 | post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http://test.host/issues/show/1' | |
37 | assert_redirected_to '/issues/show/1' |
|
37 | assert_redirected_to '/issues/show/1' | |
38 | end |
|
38 | end | |
39 |
|
39 | |||
40 | def test_login_should_not_redirect_to_another_host |
|
40 | def test_login_should_not_redirect_to_another_host | |
41 |
post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http |
|
41 | post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http://test.foo/fake' | |
42 | assert_redirected_to '/my/page' |
|
42 | assert_redirected_to '/my/page' | |
43 | end |
|
43 | end | |
44 |
|
44 |
General Comments 0
You need to be logged in to leave comments.
Login now