method

patch

Importance_1
patch(path, **args) public

Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

Show source
Register or log in to add new notes.
January 3, 2016
0 thanks

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