Update EmailServiceTest.java

This commit is contained in:
xiaobaozi-web 2025-03-16 12:37:14 +08:00 committed by GitHub
parent 757713effe
commit 5a0ba9db20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ public class EmailServiceTest {
@Test
public void testSendVerifyCode() {
String email = "864508127@qq.com"; // 使用实际的QQ邮箱
String email = "example@qq.com"; // 使用实际的QQ邮箱
String type = "REGISTER";
String verifyCode = emailService.sendVerifyCode(email, type);
@ -25,7 +25,7 @@ public class EmailServiceTest {
@Test
public void testSendFrequencyLimit() {
String email = "864508127@qq.com"; // 使用实际的QQ邮箱
String email = "example@qq.com"; // 使用实际的QQ邮箱
// 第一次发送应该成功
assert emailService.canSendCode(email) : "Should be able to send first code";
@ -34,4 +34,4 @@ public class EmailServiceTest {
// 第二次发送应该被限制
assert !emailService.canSendCode(email) : "Should not be able to send second code immediately";
}
}
}