package usecase

import "testing"

func TestRedisPlatformGateKeysShareClusterHashTag(t *testing.T) {
	gate := &RedisPlatformGate{namespace: "haixun:test:v1"}
	limited := gate.limitedKey()
	window := gate.windowKey("ai", "202607141200")
	if limited != "haixun:test:v1:usage:platform:{platform-gate}:limited" {
		t.Fatalf("unexpected limited key %q", limited)
	}
	if window != "haixun:test:v1:usage:platform:{platform-gate}:ai:202607141200" {
		t.Fatalf("unexpected window key %q", window)
	}
}
