This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/dev by this push:
new a4830a41 fix: Update Test_emailRepo_VerifyCode to handle additional
parameters
a4830a41 is described below
commit a4830a4119838d95d012a66662b2145e2a4a0097
Author: Sonui <[email protected]>
AuthorDate: Wed Jul 31 12:49:00 2024 +0800
fix: Update Test_emailRepo_VerifyCode to handle additional parameters
This commit updates the `Test_emailRepo_VerifyCode` function in the
`email_repo_test.go` file. It adds support for additional parameters in the
`SetCode` function call, specifically the `user_id` and
`skip_validation_latest_code` parameters. This change ensures that the
`VerifyCode` function can properly handle the updated code format.
---
internal/repo/repo_test/email_repo_test.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/internal/repo/repo_test/email_repo_test.go
b/internal/repo/repo_test/email_repo_test.go
index f9f43372..62d1ccb8 100644
--- a/internal/repo/repo_test/email_repo_test.go
+++ b/internal/repo/repo_test/email_repo_test.go
@@ -30,8 +30,8 @@ import (
func Test_emailRepo_VerifyCode(t *testing.T) {
emailRepo := export.NewEmailRepo(testDataSource)
- code, content := "1111", "test"
- err := emailRepo.SetCode(context.TODO(), code, content, time.Minute)
+ code, content := "1111",
"{\"source_type\":\"\",\"e_mail\":\"\",\"user_id\":\"1\",\"skip_validation_latest_code\":false}"
+ err := emailRepo.SetCode(context.TODO(), "1", code, content,
time.Minute)
assert.NoError(t, err)
verifyContent, err := emailRepo.VerifyCode(context.TODO(), code)