This is an automated email from the ASF dual-hosted git repository.

robin0716 pushed a commit to branch develop/robin
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 27615d781789bb167167ed87b926bb9490b88a1c
Author: Sonui <m...@sonui.cn>
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)

Reply via email to