feat: add display_cart_item_images feature to tenants and update related resources
This commit is contained in:
@@ -75,6 +75,21 @@ class CartControllerTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_it_filters_item_images_when_the_tenant_disables_them(): void
|
||||
{
|
||||
$tenant = $this->createTenant('acme');
|
||||
$tenant->update(['display_cart_item_images' => false]);
|
||||
$item = $this->createDirectItem($tenant, 10, '49.90');
|
||||
$item->attachments()->attach($this->createAttachment('cart-item'), ['orden' => 0]);
|
||||
|
||||
$this->postJson('/api/tenants/acme/cart/items', [
|
||||
'catalog_item_id' => $item->id,
|
||||
'cantidad' => 1,
|
||||
])
|
||||
->assertOk()
|
||||
->assertJsonPath('data.items.0.imagen', null);
|
||||
}
|
||||
|
||||
public function test_it_adds_a_specific_variant_and_merges_repeated_additions(): void
|
||||
{
|
||||
$tenant = $this->createTenant('acme');
|
||||
|
||||
Reference in New Issue
Block a user