package mysql

import (
	"testing"

	resourcedomain "hyapp/services/wallet-service/internal/domain/resource"
)

func TestDecorativeResourceTypesAreEquipable(t *testing.T) {
	for _, resourceType := range []string{resourcedomain.TypeProfileCard, resourcedomain.TypeMicSeatAnimation} {
		if !isEquipableResourceType(resourceType) {
			t.Fatalf("%s resources must use the equipment slot just like other profile decorations", resourceType)
		}
	}
}

func TestGrantDefaultEquippedResourceTypes(t *testing.T) {
	for _, resourceType := range []string{resourcedomain.TypeBadge, resourcedomain.TypeMicSeatAnimation} {
		if !isAutoEquippedOnGrantResourceType(resourceType) {
			t.Fatalf("%s resources must auto equip inside resource grant transactions", resourceType)
		}
	}
	if isAutoEquippedOnGrantResourceType(resourcedomain.TypeAvatarFrame) {
		t.Fatalf("avatar_frame grants must not auto equip; level frames are display projection rewards, not user equipment changes")
	}
}
