new apps.lyric.views login FBV; new login path in .urls; new UT in .tests.test_views to assert the FBV's redirect to '/'
This commit is contained in:
@@ -33,3 +33,8 @@ class SendLoginEmailViewTest(TestCase):
|
||||
"Check your email!—there you'll find a magic login link. But hurry… it's only temporary!",
|
||||
)
|
||||
self.assertEqual(message.tags, "success")
|
||||
|
||||
class LoginViewTest(TestCase):
|
||||
def test_redirects_to_home_page(self):
|
||||
response = self.client.get("/apps/lyric/login?token=abc123")
|
||||
self.assertRedirects(response, "/")
|
||||
|
||||
Reference in New Issue
Block a user