package ai

import "testing"

func TestSpendStatusCostRemaining(t *testing.T) {
	limit := int64(10_000_000)
	status := SpendStatus{
		CostUsedTodayMicroEUR:  4_000_000,
		CostLimitTodayMicroEUR: &limit,
		Currency:               "EUR",
	}
	remaining := *status.CostLimitTodayMicroEUR - status.CostUsedTodayMicroEUR
	if remaining != 6_000_000 {
		t.Fatalf("cost remaining = %d", remaining)
	}
}

func TestErrQuotaExceeded(t *testing.T) {
	if ErrQuotaExceeded.Error() == "" {
		t.Fatal("expected error message")
	}
}
