package mysql

import (
	"testing"

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

func TestNormalizeGiftConfigListQueryAllowsPanelPageSize(t *testing.T) {
	query := normalizeGiftConfigListQuery(resourcedomain.ListGiftConfigsQuery{
		Page:     1,
		PageSize: 500,
	})
	if query.PageSize != 500 {
		t.Fatalf("gift panel list page size must allow 500, got %d", query.PageSize)
	}

	query = normalizeGiftConfigListQuery(resourcedomain.ListGiftConfigsQuery{
		Page:     1,
		PageSize: 501,
	})
	if query.PageSize != 500 {
		t.Fatalf("gift list page size must be capped at 500, got %d", query.PageSize)
	}
}
