(t *testing.T)
| 39 | } |
| 40 | |
| 41 | func TestInMemoryRefreshTokenStore_Set(t *testing.T) { |
| 42 | store := NewInMemoryRefreshTokenStore() |
| 43 | user := &User{ID: "123", Username: "testuser", Email: "test@example.com"} |
| 44 | expiry := time.Now().Add(time.Hour) |
| 45 | |
| 46 | err := store.Set(context.Background(), "token123", user, expiry) |
| 47 | if err != nil { |
| 48 | t.Fatalf("Set() returned error: %v", err) |
| 49 | } |
| 50 | |
| 51 | count, _ := store.Count(context.Background()) |
| 52 | if count != 1 { |
| 53 | t.Fatalf("Expected count to be 1, got %d", count) |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | func TestInMemoryRefreshTokenStore_SetEmptyToken(t *testing.T) { |
| 58 | store := NewInMemoryRefreshTokenStore() |
nothing calls this directly
no test coverage detected
searching dependent graphs…