mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
failing test for #1665
This commit is contained in:
parent
dc655192fe
commit
d113390ab4
@ -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 New Issue
Block a user