A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: Add time parameter when updating user status
Sonuib33e9fc93e35
diff --git a/internal/repo/repo_test/user_backyard_repo_test.go b/internal/repo/repo_test/user_backyard_repo_test.goindex e1db0d60..073a600c 100644--- a/internal/repo/repo_test/user_backyard_repo_test.go+++ b/internal/repo/repo_test/user_backyard_repo_test.go@@ -22,6 +22,7 @@ package repo_testimport ("context""testing"+ "time""github.com/apache/answer/internal/entity""github.com/apache/answer/internal/repo/auth"@@ -53,7 +54,7 @@ func Test_userAdminRepo_UpdateUserStatus(t *testing.T) {assert.Equal(t, entity.UserStatusAvailable, got.Status)err = userAdminRepo.UpdateUserStatus(context.TODO(), "1", entity.UserStatusSuspended, entity.EmailStatusAvailable,- "[email protected]")+ "[email protected]", time.Now().Add(time.Minute*5))assert.NoError(t, err)got, exist, err = userAdminRepo.GetUserInfo(context.TODO(), "1")@@ -62,7 +63,7 @@ func Test_userAdminRepo_UpdateUserStatus(t *testing.T) {assert.Equal(t, entity.UserStatusSuspended, got.Status)err = userAdminRepo.UpdateUserStatus(context.TODO(), "1", entity.UserStatusAvailable, entity.EmailStatusAvailable,- "[email protected]")+ "[email protected]", time.Time{})assert.NoError(t, err)got, exist, err = userAdminRepo.GetUserInfo(context.TODO(), "1")