class TestRedirectInterpolation
Constants
- APP
- Routes
Public Instance Methods
app()
click to toggle source
# File actionpack/test/dispatch/routing_test.rb, line 4165 def app; APP end
Private Instance Methods
expected_redirect_body(url)
click to toggle source
# File actionpack/test/dispatch/routing_test.rb, line 4192 def expected_redirect_body(url) %(<html><body>You are being <a href="#{ERB::Util.h(url)}">redirected</a>.</body></html>) end
verify_redirect(url, status = 301)
click to toggle source
# File actionpack/test/dispatch/routing_test.rb, line 4186 def verify_redirect(url, status = 301) assert_equal status, @response.status assert_equal url, @response.headers["Location"] assert_equal expected_redirect_body(url), @response.body end