fix: restore tubco user onboarding access
This commit is contained in:
@@ -32,6 +32,10 @@ class AccountUISmokeTests(TestCase):
|
||||
|
||||
def test_user_profile_is_created_automatically(self):
|
||||
self.assertTrue(UserProfile.objects.filter(user=self.user).exists())
|
||||
profile = UserProfile.objects.get(user=self.user)
|
||||
self.assertEqual(profile.temporary_role_key, '')
|
||||
self.assertIsNone(profile.temporary_role_expires_at)
|
||||
self.assertEqual(profile.temporary_role_reason, '')
|
||||
|
||||
def test_notification_preferences_can_be_updated(self):
|
||||
response = self.client.post(
|
||||
@@ -179,3 +183,14 @@ class AccountUISmokeTests(TestCase):
|
||||
self.assertEqual(response.status_code, 302)
|
||||
profile.refresh_from_db()
|
||||
self.assertEqual(profile.totp_recovery_codes, [])
|
||||
|
||||
def test_login_accepts_email_after_password_is_set(self):
|
||||
client = Client()
|
||||
|
||||
response = client.post(
|
||||
'/accounts/login/',
|
||||
{'username': 'profile@example.com', 'password': 'secret-12345'},
|
||||
HTTP_HOST='localhost',
|
||||
)
|
||||
|
||||
self.assertEqual(response.status_code, 302)
|
||||
|
||||
Reference in New Issue
Block a user