method
redirect_url_match?
v3.0.0 -
Show latest stable
- Class:
ActionDispatch::TestResponse::DeprecatedHelpers
redirect_url_match?(pattern)public
No documentation available.
# File actionpack/lib/action_dispatch/testing/test_response.rb, line 44
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?
p = Regexp.new(pattern) if pattern.class == String
p = pattern if pattern.class == Regexp
return false if p.nil?
p.match(redirect_url) != nil
end