Notes posted by RossInBoulder
RSS feed
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