Instance Public methods
delete(path, **args) Link
Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process
for more details.
follow_redirect!(headers: {}, **args) Link
Follow a single redirect response. If the last response was not a redirect, an exception will be raised. Otherwise, the redirect is performed on the location header. If the redirection is a 307 or 308 redirect, the same HTTP verb will be used when redirecting, otherwise a GET request will be performed. Any arguments are passed to the underlying request.
The HTTP_REFERER header will be set to the previous url.
# File actionpack/lib/action_dispatch/testing/integration.rb, line 63 def follow_redirect!(headers: {}, **args) raise "not a redirect! #{status} #{status_message}" unless redirect? method = if [307, 308].include?(response.status) request.method.downcase else :get end if [ :HTTP_REFERER, "HTTP_REFERER" ].none? { |key| headers.key? key } headers["HTTP_REFERER"] = request.url end public_send(method, response.location, headers: headers, **args) status end
get(path, **args) Link
Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process
for more details.
head(path, **args) Link
Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process
for more details.
options(path, **args) Link
Performs an OPTIONS request with the given parameters. See ActionDispatch::Integration::Session#process
for more details.
patch(path, **args) Link
Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process
for more details.
post(path, **args) Link
Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process
for more details.
put(path, **args) Link
Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process
for more details.