Compare commits

...

2 Commits
dev ... main

2 changed files with 13 additions and 7 deletions

View File

@ -22,7 +22,7 @@ class InvitationPurchaseProvisioner
private const ALLOCATIONS = [ private const ALLOCATIONS = [
['sector' => 'A', 'row' => 1, 'first_seat' => 1, 'last_seat' => 16, 'type' => 'NORMAL'], ['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' => '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'], ['sector' => 'C', 'row' => 3, 'first_seat' => 6, 'last_seat' => 7, 'type' => 'NORMAL'],
]; ];

View File

@ -218,13 +218,13 @@ class DesfilePuraTendenciaSeederTest extends TestCase
->whereIn('variant_id', (clone $variants)->pluck('id')) ->whereIn('variant_id', (clone $variants)->pluck('id'))
->count()); ->count());
$this->assertSame(330, (clone $variants)->whereNull('event_date_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')) ->whereIn('id', (clone $variants)->pluck('inventory_id'))
->where('real_stock', 1) ->where('real_stock', 1)
->where('reserved_stock', 0) ->where('reserved_stock', 0)
->where('sold_units', 0) ->where('sold_units', 0)
->count()); ->count());
$this->assertSame(46, DB::table('inventories') $this->assertSame(47, DB::table('inventories')
->whereIn('id', (clone $variants)->pluck('inventory_id')) ->whereIn('id', (clone $variants)->pluck('inventory_id'))
->where('real_stock', 0) ->where('real_stock', 0)
->where('reserved_stock', 0) ->where('reserved_stock', 0)
@ -289,14 +289,14 @@ class DesfilePuraTendenciaSeederTest extends TestCase
$items = DB::table('compra_items')->where('compra_id', $purchase->id); $items = DB::table('compra_items')->where('compra_id', $purchase->id);
$this->assertSame(48, (clone $items)->count()); $this->assertSame(49, (clone $items)->count());
$this->assertSame(48, (clone $items) $this->assertSame(49, (clone $items)
->where('precio_unitario', 0) ->where('precio_unitario', 0)
->where('discount_total', 0) ->where('discount_total', 0)
->where('tax_total', 0) ->where('tax_total', 0)
->where('total', 0) ->where('total', 0)
->count()); ->count());
$this->assertSame(48, DB::table('tickets') $this->assertSame(49, DB::table('tickets')
->where('source_purchase_id', $purchase->id) ->where('source_purchase_id', $purchase->id)
->where('user_id', $user->id) ->where('user_id', $user->id)
->where('source_catalog_item_id', $catalogItemId) ->where('source_catalog_item_id', $catalogItemId)
@ -309,7 +309,13 @@ class DesfilePuraTendenciaSeederTest extends TestCase
foreach ([ foreach ([
['sector' => 'A', 'fila' => '1', 'tipo' => 'NORMAL', 'count' => 16], ['sector' => 'A', 'fila' => '1', 'tipo' => 'NORMAL', 'count' => 16],
['sector' => 'A', 'fila' => '3', 'tipo' => 'NORMAL', 'count' => 14], ['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']], ['sector' => 'C', 'fila' => '3', 'tipo' => 'NORMAL', 'count' => 2, 'seats' => ['6', '7']],
] as $allocation) { ] as $allocation) {
$allocatedVariants = DB::table('variantes') $allocatedVariants = DB::table('variantes')