(t *testing.T)
| 148 | } |
| 149 | |
| 150 | func TestCheckAgentCreate_AllowsBelowCap(t *testing.T) { |
| 151 | store := &fakeStore{found: true, row: Limits{MaxAgents: 3, MaxDomains: 1, MaxMessagesMonth: 1, MaxStorageBytes: 1}} |
| 152 | counter := &fakeCounter{agents: 2} |
| 153 | e := newEnforcerWithReader(store, counter, defaultsForTest(), 0) |
| 154 | |
| 155 | if err := e.CheckAgentCreate(context.Background(), "user1"); err != nil { |
| 156 | t.Errorf("CheckAgentCreate at 2/3: %v, want nil", err) |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | func TestCheckAgentCreate_BlocksAtCap(t *testing.T) { |
| 161 | store := &fakeStore{found: true, row: Limits{PlanCode: "free", MaxAgents: 3, MaxDomains: 1, MaxMessagesMonth: 1, MaxStorageBytes: 1, UpgradeURL: "https://up"}} |
nothing calls this directly
no test coverage detected