feat: add checkout editing policy to tenants and update related logic across services and resources

This commit is contained in:
2026-08-20 12:38:22 -03:00
parent c8ce3b0da3
commit 9c46eff880
17 changed files with 306 additions and 8 deletions

View File

@@ -81,6 +81,7 @@ class OnTicketFeaturedGroupControllerTest extends TestCase
'is_featured' => true,
])
->assertCreated()
->assertJsonPath('data.code', 'food')
->assertJsonPath('data.category_name', 'Food')
->assertJsonPath('data.group_name', 'Food')
->assertJsonPath('data.is_featured', true)
@@ -96,6 +97,7 @@ class OnTicketFeaturedGroupControllerTest extends TestCase
]);
$this->assertDatabaseHas('featured_groups', [
'tenant_code' => $tenant->codigo,
'code' => 'food',
'source_type' => 'category',
'category_id' => $categoryId,
'product_layout' => 'row',
@@ -130,6 +132,7 @@ class OnTicketFeaturedGroupControllerTest extends TestCase
'is_featured' => true,
])
->assertOk()
->assertJsonPath('data.code', 'old-name')
->assertJsonPath('data.category_name', 'New name')
->assertJsonPath('data.group_name', 'New name')
->assertJsonPath('data.is_featured', true)
@@ -142,6 +145,7 @@ class OnTicketFeaturedGroupControllerTest extends TestCase
]);
$this->assertDatabaseHas('featured_groups', [
'id' => $group->id,
'code' => 'old-name',
'group_name' => 'New name',
'product_layout' => 'row',
'group_layout' => 'paginated',