-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add config option to disable enamil confirmation
- Loading branch information
Showing
4 changed files
with
51 additions
and
5 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
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
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
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 |
---|---|---|
|
@@ -67,3 +67,17 @@ async def test_register_guest_user(self): | |
email="[email protected]", | ||
password="asdf1234", | ||
) | ||
|
||
async def test_register_without_email_confirmation(self): | ||
config = TEST_CONFIG.model_copy(deep=True) | ||
config.registration.require_email_confirmation = False | ||
user_service = UserService(self.db_pool, config=config) | ||
|
||
user_id = await user_service.register_user( | ||
username="guest user 1", | ||
email="[email protected]", | ||
password="asdf1234", | ||
) | ||
self.assertIsNotNone(user_id) | ||
user = await user_service.get_user(user_id=user_id) | ||
self.assertFalse(user.pending) |