From d16d9bdf6afaec75b01bb7323dd31747c9d688f0 Mon Sep 17 00:00:00 2001 From: Sonui Date: Wed, 31 Jul 2024 12:49:00 +0800 Subject: [PATCH] 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 f9f433723..62d1ccb85 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)