aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2015-09-21 17:44:19 -0700
committerJeremy Daer <jeremydaer@gmail.com>2015-09-21 17:44:19 -0700
commitb694796da076b1a0ceb0ffbaa66964c1914397c8 (patch)
tree3c2b93f355c56590eef5ec431158c6c3a04aca42 /actionpack
parent6486c7ac94268728c4255b420d36cb859cd3ea20 (diff)
parent58ec903cd4eb9790d1a757a9d680d03d801d794d (diff)
downloadrails-b694796da076b1a0ceb0ffbaa66964c1914397c8.tar.gz
rails-b694796da076b1a0ceb0ffbaa66964c1914397c8.tar.bz2
rails-b694796da076b1a0ceb0ffbaa66964c1914397c8.zip
Merge pull request #21703 from ronakjangir47/redirect_error_messages
Added assertion for error messages for redirection to nil and params
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/redirect_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index 91b30ede6a..631ff7d02a 100644
--- a/actionpack/test/controller/redirect_test.rb
+++ b/actionpack/test/controller/redirect_test.rb
@@ -266,15 +266,17 @@ class RedirectTest < ActionController::TestCase
end
def test_redirect_to_nil
- assert_raise(ActionController::ActionControllerError) do
+ error = assert_raise(ActionController::ActionControllerError) do
get :redirect_to_nil
end
+ assert_equal "Cannot redirect to nil!", error.message
end
def test_redirect_to_params
- assert_raise(ActionController::ActionControllerError) do
+ error = assert_raise(ActionController::ActionControllerError) do
get :redirect_to_params
end
+ assert_equal "Cannot redirect to a parameter hash!", error.message
end
def test_redirect_to_with_block