I don\'t know what I\'m doing wrong, but every time I try to test for a redirect, I get this error: \"@request must be an ActionDispatch::Request\"
context \
Rspec 3:
The easiest way to test for the current path is with:
expect(page).to have_current_path('/login?status=invalid_token')
The have_current_path has an advantage over this approach:
have_current_path
expect(current_path).to eq('/login')
because you can include query params.