aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-08-06 08:37:25 +0000
committerJamis Buck <jamis@37signals.com>2005-08-06 08:37:25 +0000
commit50e247443371630e03cb360867770170a76ecb8b (patch)
treeb1fa8948ded0f06fa573247882c03c617fb1c9b2 /actionpack/lib/action_controller
parenta3469cadadfd770ad9029f651f3a51560bbd3045 (diff)
downloadrails-50e247443371630e03cb360867770170a76ecb8b.tar.gz
rails-50e247443371630e03cb360867770170a76ecb8b.tar.bz2
rails-50e247443371630e03cb360867770170a76ecb8b.zip
Make assert_redirected_to properly check URL's passed as strings #1910 [Scott Barron]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1971 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/assertions.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb
index bb81ffac75..ad70111f3b 100644
--- a/actionpack/lib/action_controller/assertions.rb
+++ b/actionpack/lib/action_controller/assertions.rb
@@ -78,9 +78,8 @@ module Test #:nodoc:
[u, (p[0..0] == '/') ? p : '/' + p]
end.flatten
- if eurl && url then assert_equal(eurl, url, msg)
- else assert_equal(epath, path, msg)
- end
+ assert_equal(eurl, url, msg) if eurl && url
+ assert_equal(epath, path, msg) if epath && path
else
msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is <?>)",
@response.redirected_to || @response.redirect_url)