removed all references to credits. now credits are completely replaced by addons.

This commit is contained in:
Codex Agent
2025-12-01 15:50:17 +01:00
parent b8e515a03c
commit 28539754a7
76 changed files with 97 additions and 2533 deletions

View File

@@ -146,22 +146,4 @@ class TenantModelTest extends TestCase
$this->assertFalse($tenant->features['analytics']);
}
public function test_increment_credits_clears_warning_when_balance_above_threshold(): void
{
Config::set('package-limits.credit_thresholds', [5, 1]);
$tenant = Tenant::factory()->create([
'event_credits_balance' => 1,
'credit_warning_sent_at' => now()->subDay(),
'credit_warning_threshold' => 1,
]);
$tenant->incrementCredits(10);
$tenant->refresh();
$this->assertNull($tenant->credit_warning_sent_at);
$this->assertNull($tenant->credit_warning_threshold);
$this->assertSame(11, (int) $tenant->event_credits_balance);
}
}