method
patch
v8.0.0 -
Show latest stable
- Class:
ActionDispatch::Integration::RequestHelpers
patch(path, **args)public
Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process for more details.
1Note
Setting HTTP_REFERER
If your integration test is checking for correct behavior of a redirect to the request referer, you can set the referring path in the headers hash with syntax like:
patch update_user_role_path, { user: {role: "vip"} }, { 'HTTP_REFERER' => user_url }
assert_redirected_to user_url