mirror of
https://github.com/Sosokker/ku-polls.git
synced 2025-12-18 13:04:05 +01:00
Write test for redirect signup
This commit is contained in:
parent
0987543e53
commit
f0c048318d
@ -33,3 +33,13 @@ class SignUpTestCase(TestCase):
|
||||
response = self.client.post(signup_url, data)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertFalse(User.objects.filter(username='').exists())
|
||||
|
||||
def test_redirect_after_complete_signup(self):
|
||||
signup_url = reverse("polls:signup")
|
||||
data = {
|
||||
'username': 'tester_signup',
|
||||
'password1': 'testpassword123',
|
||||
'password2': 'testpassword123',
|
||||
}
|
||||
response = self.client.post(signup_url, data)
|
||||
self.assertRedirects(response, reverse("polls:index"))
|
||||
Loading…
Reference in New Issue
Block a user