1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #21703 from ronakjangir47/redirect_error_messages

Added assertion for error messages for redirection to nil and params
This commit is contained in:
Jeremy Daer 2015-09-21 17:44:19 -07:00
commit b694796da0

View file

@ -266,15 +266,17 @@ class RedirectTest < ActionController::TestCase
end end
def test_redirect_to_nil def test_redirect_to_nil
assert_raise(ActionController::ActionControllerError) do error = assert_raise(ActionController::ActionControllerError) do
get :redirect_to_nil get :redirect_to_nil
end end
assert_equal "Cannot redirect to nil!", error.message
end end
def test_redirect_to_params def test_redirect_to_params
assert_raise(ActionController::ActionControllerError) do error = assert_raise(ActionController::ActionControllerError) do
get :redirect_to_params get :redirect_to_params
end end
assert_equal "Cannot redirect to a parameter hash!", error.message
end end
def test_redirect_to_with_block def test_redirect_to_with_block