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:
commit
b694796da0
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue