mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Updated unit test
This commit is contained in:
@@ -49,7 +49,7 @@ class ProfileForm(forms.ModelForm):
|
||||
widget=forms.PasswordInput(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
class Meta(object):
|
||||
class Meta:
|
||||
model = User
|
||||
fields = ("first_name", "last_name", "language",
|
||||
"phone_number", "secondary_email")
|
||||
|
||||
@@ -148,15 +148,26 @@ class ProfileTestCase(ModoTestCase):
|
||||
|
||||
self.ajax_post(
|
||||
reverse("core:user_profile"),
|
||||
{"oldpassword": "toto",
|
||||
{"language": "en",
|
||||
"oldpassword": "toto",
|
||||
"confirmation": "tutu"},
|
||||
status=400
|
||||
)
|
||||
|
||||
self.ajax_post(
|
||||
reverse("core:user_profile"),
|
||||
{"oldpassword": "toto",
|
||||
"newpassword": "tutu", "confirmation": "tutu"},
|
||||
{"language": "en",
|
||||
"oldpassword": "toto",
|
||||
"newpassword": "tutu"},
|
||||
status=400
|
||||
)
|
||||
|
||||
self.ajax_post(
|
||||
reverse("core:user_profile"),
|
||||
{"language": "en",
|
||||
"oldpassword": "toto",
|
||||
"newpassword": "tutu",
|
||||
"confirmation": "tutu"},
|
||||
status=400
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user