Skip to content

Commit 7e5dbae

Browse files
committed
test: add test creating email verification
1 parent ee82f9a commit 7e5dbae

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

rook/src/domain/email_verification.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,12 @@ mod tests {
187187
assert_eq!(code.expose_secret().len(), 6);
188188
assert!(code.expose_secret().chars().all(|c| c.is_digit(10)));
189189
}
190+
191+
#[test]
192+
fn test_create_email_verification() {
193+
let email = "test@example.com";
194+
let verification = EmailVerification::new(email.to_string());
195+
assert_eq!(verification.email, email);
196+
assert!(verification.expires_at > verification.created_at);
197+
}
190198
}

0 commit comments

Comments
 (0)