diff options
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_response.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 6d019023ce..9a51a32899 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -36,6 +36,11 @@ module ActionDispatch @template.layout end + def redirected_to + ::ActiveSupport::Deprecation.warn("response.redirected_to is deprecated. Use response.redirect_url instead", caller) + redirect_url + end + def redirect_url_match?(pattern) ::ActiveSupport::Deprecation.warn("response.redirect_url_match? is deprecated. Use assert_match(/foo/, response.redirect_url) instead", caller) return false if redirect_url.nil? |