diff options
author | Lance Ivy <lance@cainlevy.net> | 2008-11-22 13:10:12 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-11-22 13:10:12 -0600 |
commit | cd1a9ed991e8988dbcc28023b91e76b5ee45f79b (patch) | |
tree | b1e10b7d6b66edbd9c395c28ca328be02569a712 /actionpack/test/controller | |
parent | f42c77f927eb49b00e84d355e07de48723d03fcb (diff) | |
download | rails-cd1a9ed991e8988dbcc28023b91e76b5ee45f79b.tar.gz rails-cd1a9ed991e8988dbcc28023b91e76b5ee45f79b.tar.bz2 rails-cd1a9ed991e8988dbcc28023b91e76b5ee45f79b.zip |
Add TestResponse#client_error? to check for 4xx status codes [#851 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 7050000dd8..6cad0e2827 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -366,6 +366,12 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase assert @response.missing? end + # check client errors + def test_client_error_response_code + process :response404 + assert @response.client_error? + end + # check to see if our redirection matches a pattern def test_redirect_url_match process :redirect_external |