(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func TestStatsTracker_ClearAllStats(t *testing.T) { |
| 111 | tracker := New() |
| 112 | ctx := context.Background() |
| 113 | |
| 114 | updateSample(tracker, "key1", "user1@example.com", 1000, 2000, "1.2.3.4") |
| 115 | tracker.ClearAllStats() |
| 116 | |
| 117 | resp := tracker.GetUsersStats(ctx, false) |
| 118 | if len(resp.Stats) != 0 { |
| 119 | t.Errorf("Expected 0 stats after clear, got %d", len(resp.Stats)) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func TestStatsTracker_RemoveStatsEntryDeletedOnReset(t *testing.T) { |
| 124 | tracker := New() |
nothing calls this directly
no test coverage detected