Files

19 lines
437 B
Go
Raw Permalink Normal View History

package app
import (
"context"
"reflect"
"testing"
)
func TestAdminUserInvalidateQuotaSummaryCache(t *testing.T) {
cache := &recordingCache{}
svc := NewAdminUserService(nil, nil, "").WithCache(cache)
svc.invalidateQuotaSummaryCache(context.Background(), 42)
if want := []string{"workspace:quota_summary:42"}; !reflect.DeepEqual(cache.deletedKeys, want) {
t.Fatalf("deleted keys = %v, want %v", cache.deletedKeys, want)
}
}