feat(website-extras): add 'is_enabled' column to websites_extras table and update model and tests

This commit is contained in:
2026-07-31 09:38:30 -03:00
parent cbb7b1c3a1
commit 45e56c43a6
5 changed files with 73 additions and 5 deletions

View File

@@ -41,6 +41,7 @@ class WebsiteExtrasTest extends TestCase
'website_code',
'website_type_extra_id',
'config',
'is_enabled',
'created_at',
'updated_at',
], Schema::getColumnListing('websites_extras'));
@@ -67,6 +68,7 @@ class WebsiteExtrasTest extends TestCase
$websiteExtra = $tenant->websiteExtras()->create([
'website_type_extra_id' => $typeExtra->id,
'config' => ['phone' => '+5491112345678'],
'is_enabled' => true,
]);
$this->assertTrue($type->extras()->firstOrFail()->is($typeExtra));
@@ -85,6 +87,7 @@ class WebsiteExtrasTest extends TestCase
'required' => ['phone'],
], $typeExtra->config_schema);
$this->assertSame(['phone' => '+5491112345678'], $websiteExtra->config);
$this->assertTrue($websiteExtra->is_enabled);
}
public function test_deleting_a_type_cascades_its_definitions_and_website_values(): void