test email signup flow

This commit is contained in:
Yisroel Baum 2026-08-03 20:22:50 +03:00
parent a95903ed05
commit 9945163a2f
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
12 changed files with 631 additions and 0 deletions

View file

@ -21,4 +21,19 @@ class UserTest extends TestCase
$this->assertSame($email, $user->getEmail());
$this->assertSame('hashed-password', $user->getPasswordHash());
}
public function test_it_can_confirm_a_pending_user_with_a_password(): void
{
$user = new User(
id: 42,
email: new EmailAddress('user@example.com'),
passwordHash: null,
);
$this->assertNull($user->getPasswordHash());
$user->setPasswordHash('hashed-password');
$this->assertSame('hashed-password', $user->getPasswordHash());
}
}