mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-01 12:04:47 +00:00
failing test for #1665
This commit is contained in:
parent
dc655192fe
commit
d113390ab4
1 changed files with 18 additions and 0 deletions
|
|
@ -82,6 +82,24 @@ class TestUserCreateView(TestCase, WagtailTestUtils):
|
|||
self.assertEqual(users.count(), 1)
|
||||
self.assertEqual(users.first().email, 'test@user.com')
|
||||
|
||||
def test_create_with_password_mismatch(self):
|
||||
response = self.post({
|
||||
'username': "testuser",
|
||||
'email': "test@user.com",
|
||||
'first_name': "Test",
|
||||
'last_name': "User",
|
||||
'password1': "password1",
|
||||
'password2': "password2",
|
||||
})
|
||||
|
||||
# Should remain on page
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'wagtailusers/users/create.html')
|
||||
|
||||
# Check that the user was not created
|
||||
users = get_user_model().objects.filter(username='testuser')
|
||||
self.assertEqual(users.count(), 0)
|
||||
|
||||
|
||||
class TestUserEditView(TestCase, WagtailTestUtils):
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue