feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea9a53f742
commit
25f23d541e
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Support\ProductBillingCycles;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ProductBillingCyclesTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_defaults_and_saved_cycles(): void
|
||||
{
|
||||
$this->assertSame(['annually'], ProductBillingCycles::forType('domain'));
|
||||
$this->assertContains('monthly', ProductBillingCycles::forType('vps'));
|
||||
|
||||
ProductBillingCycles::save(['hosting' => ['monthly', 'annually'], 'domain' => ['annually', 'biennially']]);
|
||||
|
||||
$this->assertSame(['monthly', 'annually'], ProductBillingCycles::forType('hosting'));
|
||||
$this->assertTrue(ProductBillingCycles::allows('domain', 'biennially'));
|
||||
$this->assertFalse(ProductBillingCycles::allows('hosting', 'quarterly'));
|
||||
$this->assertTrue(ProductBillingCycles::allows('hosting', 'onetime'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user