MCPcopy
hub / github.com/usememos/memos / TestUserSettingGetUserByPATHashNotFound

Function TestUserSettingGetUserByPATHashNotFound

store/test/user_setting_test.go:352–365  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

350}
351
352func TestUserSettingGetUserByPATHashNotFound(t *testing.T) {
353 t.Parallel()
354 ctx := context.Background()
355 ts := NewTestingStore(ctx, t)
356 _, err := createTestingHostUser(ctx, ts)
357 require.NoError(t, err)
358
359 // Lookup non-existent PAT hash
360 result, err := ts.GetUserByPATHash(ctx, "non-existent-hash")
361 require.Error(t, err)
362 require.Nil(t, result)
363
364 ts.Close()
365}
366
367func TestUserSettingGetUserByPATHashNoTokensKey(t *testing.T) {
368 t.Parallel()

Callers

nothing calls this directly

Calls 5

NewTestingStoreFunction · 0.85
createTestingHostUserFunction · 0.85
GetUserByPATHashMethod · 0.65
ErrorMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected