about summary refs log tree commit diff
path: root/tests/unit/auth/test_admin_users.py
AgeCommit message (Collapse)Author
2026-08-26test(admin/users): failure path and credential-storage testsClaude
Two additional unit tests for create_verified_user: * test_create_verified_user_stores_credentials — asserts a password credential row is persisted in user_credentials after creation * test_create_verified_user_raises_on_duplicate_email — asserts an exception is raised when the same email is registered twice (enforced by the UNIQUE constraint on users.email) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
2026-08-26test(admin/users): unit tests for create_verified_user model functionClaude
Two unit tests for the (not yet implemented) create_verified_user function in gn_auth.auth.authorisation.users.admin.models: * test_create_verified_user_sets_verified_flag — asserts user.verified is True and the flag is persisted in the DB * test_create_verified_user_has_no_roles — asserts no roles are assigned to the newly created user Both tests use conn_after_auth_migrations to run against a fully migrated SQLite test database. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>