-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e52d970
commit 7ed76e0
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ def test_api_sign_up(self, mock_capture): | |
"/api/signup/", | ||
{ | ||
"first_name": "John", | ||
"last_name": "Doe", | ||
"email": "[email protected]", | ||
"password": "notsecure", | ||
"organization_name": "Hedgehogs United, LLC", | ||
|
@@ -62,8 +63,8 @@ def test_api_sign_up(self, mock_capture): | |
"id": user.pk, | ||
"uuid": str(user.uuid), | ||
"distinct_id": user.distinct_id, | ||
"last_name": "", | ||
"first_name": "John", | ||
"last_name": "Doe", | ||
"email": "[email protected]", | ||
"redirect_url": "/", | ||
"is_email_verified": False, | ||
|
@@ -72,6 +73,7 @@ def test_api_sign_up(self, mock_capture): | |
|
||
# Assert that the user was properly created | ||
self.assertEqual(user.first_name, "John") | ||
self.assertEqual(user.last_name, "Doe") | ||
self.assertEqual(user.email, "[email protected]") | ||
self.assertFalse(user.email_opt_in) | ||
self.assertTrue(user.is_staff) # True because this is the first user in the instance | ||
|
@@ -223,7 +225,7 @@ def test_signup_minimum_attrs(self, mock_capture): | |
self.assertEqual(user.first_name, "Jane") | ||
self.assertEqual(user.email, "[email protected]") | ||
self.assertTrue(user.email_opt_in) # Defaults to True | ||
self.assertEqual(organization.name, "Jane") | ||
self.assertEqual(organization.name, f"{user.first_name}'s Organization") | ||
self.assertTrue(user.is_staff) # True because this is the first user in the instance | ||
|
||
# Assert that the sign up event & identify calls were sent to PostHog analytics | ||
|