diff --git a/app/Domains/Desfile/Services/InvitationPurchaseProvisioner.php b/app/Domains/Desfile/Services/InvitationPurchaseProvisioner.php index 6e76244..441d127 100644 --- a/app/Domains/Desfile/Services/InvitationPurchaseProvisioner.php +++ b/app/Domains/Desfile/Services/InvitationPurchaseProvisioner.php @@ -22,7 +22,7 @@ class InvitationPurchaseProvisioner private const ALLOCATIONS = [ ['sector' => 'A', 'row' => 1, 'first_seat' => 1, 'last_seat' => 16, 'type' => 'NORMAL'], ['sector' => 'A', 'row' => 3, 'first_seat' => 1, 'last_seat' => 14, 'type' => 'NORMAL'], - ['sector' => 'C', 'row' => 1, 'first_seat' => 1, 'last_seat' => 16, 'type' => 'VIP + LUNCH'], + ['sector' => 'C', 'row' => 1, 'first_seat' => 1, 'last_seat' => 17, 'type' => 'VIP + LUNCH'], ['sector' => 'C', 'row' => 3, 'first_seat' => 6, 'last_seat' => 7, 'type' => 'NORMAL'], ]; diff --git a/tests/Feature/Seeders/DesfilePuraTendenciaSeederTest.php b/tests/Feature/Seeders/DesfilePuraTendenciaSeederTest.php index 22fa727..c990b89 100644 --- a/tests/Feature/Seeders/DesfilePuraTendenciaSeederTest.php +++ b/tests/Feature/Seeders/DesfilePuraTendenciaSeederTest.php @@ -218,13 +218,13 @@ class DesfilePuraTendenciaSeederTest extends TestCase ->whereIn('variant_id', (clone $variants)->pluck('id')) ->count()); $this->assertSame(330, (clone $variants)->whereNull('event_date_id')->count()); - $this->assertSame(284, DB::table('inventories') + $this->assertSame(283, DB::table('inventories') ->whereIn('id', (clone $variants)->pluck('inventory_id')) ->where('real_stock', 1) ->where('reserved_stock', 0) ->where('sold_units', 0) ->count()); - $this->assertSame(46, DB::table('inventories') + $this->assertSame(47, DB::table('inventories') ->whereIn('id', (clone $variants)->pluck('inventory_id')) ->where('real_stock', 0) ->where('reserved_stock', 0) @@ -289,14 +289,14 @@ class DesfilePuraTendenciaSeederTest extends TestCase $items = DB::table('compra_items')->where('compra_id', $purchase->id); - $this->assertSame(48, (clone $items)->count()); - $this->assertSame(48, (clone $items) + $this->assertSame(49, (clone $items)->count()); + $this->assertSame(49, (clone $items) ->where('precio_unitario', 0) ->where('discount_total', 0) ->where('tax_total', 0) ->where('total', 0) ->count()); - $this->assertSame(48, DB::table('tickets') + $this->assertSame(49, DB::table('tickets') ->where('source_purchase_id', $purchase->id) ->where('user_id', $user->id) ->where('source_catalog_item_id', $catalogItemId) @@ -309,7 +309,13 @@ class DesfilePuraTendenciaSeederTest extends TestCase foreach ([ ['sector' => 'A', 'fila' => '1', 'tipo' => 'NORMAL', 'count' => 16], ['sector' => 'A', 'fila' => '3', 'tipo' => 'NORMAL', 'count' => 14], - ['sector' => 'C', 'fila' => '1', 'tipo' => 'VIP + LUNCH', 'count' => 16], + [ + 'sector' => 'C', + 'fila' => '1', + 'tipo' => 'VIP + LUNCH', + 'count' => 17, + 'seats' => array_map('strval', range(1, 17)), + ], ['sector' => 'C', 'fila' => '3', 'tipo' => 'NORMAL', 'count' => 2, 'seats' => ['6', '7']], ] as $allocation) { $allocatedVariants = DB::table('variantes')