Files
tenant-registry/internal/server/overdue_internal_test.go
T
sharangandClaude Opus 5.5 fb9a2ee621
ci / shared (push) Successful in 13s
ci / test (push) Successful in 23m47s
ci / image (push) Successful in 33s
feat(erp): overdue invoices drive the ladder from the reconcile pass (#52)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-30 11:06:30 +00:00

32 lines
711 B
Go

package server
import (
"testing"
"git.breakpilot.com/platform/tenant-registry/internal/store"
)
func TestOverdueStep(t *testing.T) {
s := &Server{}
for _, c := range []struct {
status string
days int
next string
ok bool
}{
{"active", 1, "warning", true},
{"trial", 1, "warning", true},
{"active", 14, "restricted", true},
{"warning", 30, "halted", true},
{"warning", 2, "", false},
{"restricted", 5, "", false},
{"demo", 40, "", false},
{"halted", 40, "", false},
} {
next, ok := s.overdueStep(&store.Tenant{Status: c.status}, c.days)
if next != c.next || ok != c.ok {
t.Errorf("%s %d days: %q %v, want %q %v", c.status, c.days, next, ok, c.next, c.ok)
}
}
}