diff options
author | Derek Prior <derekprior@gmail.com> | 2016-03-25 16:55:59 -0400 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-04-26 22:14:03 +0200 |
commit | cacded5a0e0acc0582c2778b9dd8df684451ad53 (patch) | |
tree | 3128477bccff6657c8b1828063c8bc22ebf7810a /actionpack/test | |
parent | f03c27cad2d3b4a9751cccdc3834f719f1cfbaa2 (diff) | |
download | rails-cacded5a0e0acc0582c2778b9dd8df684451ad53.tar.gz rails-cacded5a0e0acc0582c2778b9dd8df684451ad53.tar.bz2 rails-cacded5a0e0acc0582c2778b9dd8df684451ad53.zip |
Add more info to insecure URL generation error
I always appreciate having a bit more information as to why something is
now an error. We can use this error to tell people why what they were
previously doing is insecure and give them hints on how to fix it.
Signed-off-by: Kasper Timm Hansen <kaspth@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/redirect_test.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb index e10d4449f3..f83248402c 100644 --- a/actionpack/test/controller/redirect_test.rb +++ b/actionpack/test/controller/redirect_test.rb @@ -176,7 +176,6 @@ class RedirectTest < ActionController::TestCase assert_equal "http://www.example.com", redirect_to_url end - def test_relative_url_redirect_with_status get :relative_url_redirect_with_status assert_response 302 @@ -313,7 +312,7 @@ class RedirectTest < ActionController::TestCase error = assert_raise(ArgumentError) do get :redirect_to_params end - assert_equal "Generating a URL from non sanitized request parameters is insecure!", error.message + assert_equal ActionDispatch::Routing::INSECURE_URL_PARAMETERS_MESSAGE, error.message end def test_redirect_to_with_block |