summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-09-21 12:45:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-09-21 12:45:22 +0000
commit8a356baf3e320607ec6f85dd33f7fa8887dc1ebd (patch)
treeebaa6904582971e77d9577e11a1e0b3a890e7453 /test
parente1c4659752d25e5e3bd507648485205e1e3df9d0 (diff)
downloadredmine-8a356baf3e320607ec6f85dd33f7fa8887dc1ebd.tar.gz
redmine-8a356baf3e320607ec6f85dd33f7fa8887dc1ebd.zip
Unescape back_url param before calling redirect_to.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1893 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/account_controller_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb
index 26218d177..a6e379991 100644
--- a/test/functional/account_controller_test.rb
+++ b/test/functional/account_controller_test.rb
@@ -46,12 +46,12 @@ class AccountControllerTest < Test::Unit::TestCase
def test_login_should_redirect_to_back_url_param
# request.uri is "test.host" in test environment
- post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http://test.host/issues/show/1'
+ post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.host%2Fissues%2Fshow%2F1'
assert_redirected_to '/issues/show/1'
end
def test_login_should_not_redirect_to_another_host
- post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http://test.foo/fake'
+ post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.foo%2Ffake'
assert_redirected_to '/my/page'
end