removed all references to credits. now credits are completely replaced by addons.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user