From 0e10e93fcf8ab68944e3e76195e75cae8e72cae3 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 16 Jul 2008 19:49:46 -0500 Subject: [PATCH] All 2xx requests are considered successful [#217 state:resolved] --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/test_process.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 44ecf766c921..4c1efc23c5e6 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *2.1.1 (next release)* +* All 2xx requests are considered successful [Josh Peek] + * Deprecate the limited follow_redirect in functional tests. If you wish to follow redirects, use integration tests. [Michael Koziarski] * Deprecate define_javascript_functions, javascript_include_tag and friends are much better [Michael Koziarski] diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index b940ed868d41..d8906f83b6be 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -171,7 +171,7 @@ def message # Was the response successful? def success? - response_code == 200 + (200..299).include?(response_code) end # Was the URL not found?