Flowdock
method

patch

Importance_1
Ruby on Rails latest stable (v4.2.7) - 1 note - Class: ActionDispatch::Integration::RequestHelpers
patch(path, parameters = nil, headers_or_env = nil) public

Performs a PATCH request with the given parameters. See #get 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