Add Frontdesk Pro wallet renewal scheduling.
Deploy Ladill Frontdesk / deploy (push) Successful in 58s
Deploy Ladill Frontdesk / deploy (push) Successful in 58s
Monthly auto-renew charges due organizations from the Ladill wallet and downgrades after grace when payment fails. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -86,6 +86,28 @@ class FrontdeskProTest extends TestCase
|
||||
$this->assertSame('pro', $this->organization->fresh()->settings['plan']);
|
||||
}
|
||||
|
||||
public function test_pro_renew_extends_subscription_when_wallet_charges(): void
|
||||
{
|
||||
$this->organization->update([
|
||||
'settings' => [
|
||||
'onboarded' => true,
|
||||
'plan' => 'pro',
|
||||
'auto_renew' => true,
|
||||
'plan_expires_at' => now()->subDay()->toIso8601String(),
|
||||
],
|
||||
]);
|
||||
|
||||
Http::fake([
|
||||
'billing.test/debit' => Http::response(['ok' => true]),
|
||||
]);
|
||||
|
||||
$this->artisan('frontdesk:pro-renew')->assertSuccessful();
|
||||
|
||||
$settings = $this->organization->fresh()->settings;
|
||||
$this->assertSame('pro', $settings['plan']);
|
||||
$this->assertTrue(now()->parse($settings['plan_expires_at'])->isFuture());
|
||||
}
|
||||
|
||||
public function test_pro_sidebar_shows_active_label_after_upgrade(): void
|
||||
{
|
||||
$this->organization->update([
|
||||
|
||||
Reference in New Issue
Block a user