MCPcopy Index your code
hub / github.com/apache/answer / Test_authRepo_SetUserStatus

Function Test_authRepo_SetUserStatus

internal/repo/repo_test/auth_test.go:63–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func Test_authRepo_SetUserStatus(t *testing.T) {
64 authRepo := auth.NewAuthRepo(testDataSource)
65
66 err := authRepo.SetUserStatus(context.TODO(), userID, &entity.UserCacheInfo{UserID: userID})
67 require.NoError(t, err)
68
69 cacheInfo, err := authRepo.GetUserStatus(context.TODO(), userID)
70 require.NoError(t, err)
71 assert.Equal(t, userID, cacheInfo.UserID)
72}
73func Test_authRepo_RemoveUserStatus(t *testing.T) {
74 authRepo := auth.NewAuthRepo(testDataSource)
75

Callers

nothing calls this directly

Calls 3

SetUserStatusMethod · 0.95
GetUserStatusMethod · 0.95
NewAuthRepoFunction · 0.92

Tested by

no test coverage detected