Update admin PWA events, branding, and packages
This commit is contained in:
@@ -70,4 +70,28 @@ class TenantPackageOverviewTest extends TenantTestCase
|
||||
$this->assertSame(10, $payload['active_package']['package_limits']['used_gallery_days']);
|
||||
$this->assertSame(9, $payload['active_package']['remaining_events']);
|
||||
}
|
||||
|
||||
public function test_active_package_falls_back_to_active_endcustomer_package(): void
|
||||
{
|
||||
$package = Package::factory()->endcustomer()->create([
|
||||
'features' => ['custom_branding'],
|
||||
'branding_allowed' => true,
|
||||
'watermark_allowed' => false,
|
||||
]);
|
||||
|
||||
TenantPackage::factory()->create([
|
||||
'tenant_id' => $this->tenant->id,
|
||||
'package_id' => $package->id,
|
||||
'active' => true,
|
||||
]);
|
||||
|
||||
$request = Request::create('/api/v1/tenant/packages', 'GET');
|
||||
$request->attributes->set('tenant', $this->tenant);
|
||||
|
||||
$response = app(TenantPackageController::class)->index($request);
|
||||
$payload = $response->getData(true);
|
||||
|
||||
$this->assertSame($package->id, $payload['active_package']['package_id']);
|
||||
$this->assertSame(['custom_branding'], $payload['active_package']['package_limits']['features']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user