tomhughes left a comment (openstreetmap/openstreetmap-website#6714)
So this needs to delete `:referer` from the session in all the places that
currently delete `:pending_user` from the session, or it will stay around
forever.
I'm also not sure about the way the tests are written - they seem to be testing
more than is probably necessary and they look more like integration or system
tests than controller tests at the moment but I think that may mean they're
doing more than they need to rather than that they should be moved.
The first test is probably redundant - we already have tests further up that
check that the referer is preserved normally I think and OAuth is not special,
it's just another example of a referer. It's also not truly following through
each stop as demonstrated by the fact that at the end it just makes up the
referer URL for the final confirm rather than extracting it from the email.
The second test is mostly modelled on the first one but oddly stops sooner
without running the final test that the confirm redirects as expected.
The critical thing that should be tested is the thing that's being fixed here -
that if you visit the signup page with a referer and then visit the resend
confirmation page that the subsequent email preserves the referer and that
visiting the confirmation link from the email redirects to the expected referer
from the original signup.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6714#issuecomment-3797122166
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6714/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev