razage / persistent-flannel

a website for tracking what games you've played and getting recommendations
0 stars 0 forks source link

Check if the logout test actually needs you to login first #17

Closed razage closed 7 years ago

razage commented 7 years ago

I'm not entirely sure if the login that happens during the login test is kept or thrown away after the test. It would be nice (and make the code DRYer) if I didn't have to login during the logout test.

razage commented 7 years ago

It in fact does need you to log in first for the test to pass. It's a little tricky though, since currently it redirects you even if the login fails. Because of this, the test passes as-is if you remove the login portion. However, if you add an assertion to check that the user is logged in before it logs them out, it will fail.