MCPcopy
hub / github.com/appleboy/gin-jwt / TestNewInMemoryRefreshTokenStore

Function TestNewInMemoryRefreshTokenStore

store/memory_test.go:20–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18}
19
20func TestNewInMemoryRefreshTokenStore(t *testing.T) {
21 store := NewInMemoryRefreshTokenStore()
22
23 if store == nil {
24 t.Fatal("NewInMemoryRefreshTokenStore returned nil")
25 }
26
27 if store.tokens == nil {
28 t.Fatal("store.tokens is nil")
29 }
30
31 count, err := store.Count(context.Background())
32 if err != nil {
33 t.Fatalf("Count() returned error: %v", err)
34 }
35
36 if count != 0 {
37 t.Fatalf("Expected count to be 0, got %d", count)
38 }
39}
40
41func TestInMemoryRefreshTokenStore_Set(t *testing.T) {
42 store := NewInMemoryRefreshTokenStore()

Callers

nothing calls this directly

Calls 2

CountMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…