summaryrefslogtreecommitdiffstats
path: root/test/functional/account_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-03-29 14:54:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-03-29 14:54:06 +0000
commit1b20fa3b498d9cd27684acee5fca118e93444e4a (patch)
treee7c4c56be825845b5993e15172884dc63a0a594f /test/functional/account_controller_test.rb
parent1cfa91c6d61e94233f3b1308653628b368026b35 (diff)
downloadredmine-1b20fa3b498d9cd27684acee5fca118e93444e4a.tar.gz
redmine-1b20fa3b498d9cd27684acee5fca118e93444e4a.zip
Merged r13018 (#16466).
git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@13028 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/account_controller_test.rb')
-rw-r--r--test/functional/account_controller_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb
index 86b7871a4..88713770f 100644
--- a/test/functional/account_controller_test.rb
+++ b/test/functional/account_controller_test.rb
@@ -48,8 +48,14 @@ class AccountControllerTest < ActionController::TestCase
end
def test_login_should_not_redirect_to_another_host
- post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http://test.foo/fake'
- assert_redirected_to '/my/page'
+ back_urls = [
+ 'http://test.foo/fake',
+ '//test.foo/fake'
+ ]
+ back_urls.each do |back_url|
+ post :login, :username => 'jsmith', :password => 'jsmith', :back_url => back_url
+ assert_redirected_to '/my/page'
+ end
end
def test_login_with_wrong_password