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

Function Test_authRepo_SetAdminUserCacheInfo

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

Source from the content-addressed store, hash-verified

85}
86
87func Test_authRepo_SetAdminUserCacheInfo(t *testing.T) {
88 authRepo := auth.NewAuthRepo(testDataSource)
89
90 err := authRepo.SetAdminUserCacheInfo(context.TODO(), accessToken, &entity.UserCacheInfo{UserID: userID})
91 require.NoError(t, err)
92
93 cacheInfo, err := authRepo.GetAdminUserCacheInfo(context.TODO(), accessToken)
94 require.NoError(t, err)
95 assert.Equal(t, userID, cacheInfo.UserID)
96}
97
98func Test_authRepo_RemoveAdminUserCacheInfo(t *testing.T) {
99 authRepo := auth.NewAuthRepo(testDataSource)

Callers

nothing calls this directly

Calls 3

SetAdminUserCacheInfoMethod · 0.95
GetAdminUserCacheInfoMethod · 0.95
NewAuthRepoFunction · 0.92

Tested by

no test coverage detected