BF pool cart bug, R structure
This commit is contained in:
parent
2ea8273c29
commit
c0ae7c4927
|
|
@ -213,9 +213,9 @@ class PoolParkingCartPricingTest extends TestCase
|
|||
// - 1 cart item with Spot 2 (qty 2): price 500, price_id from pool
|
||||
// - 1 cart item with Spot 3 (qty 2): price 1000, price_id from Spot 3
|
||||
// Total: 3 cart items
|
||||
|
||||
|
||||
$this->assertCount(3, $items);
|
||||
|
||||
|
||||
// First cart item (price 300) should have Spot 1's price_id
|
||||
$item300 = $items->first(fn($i) => $i->price === 300);
|
||||
$this->assertNotNull($item300);
|
||||
|
|
@ -227,7 +227,7 @@ class PoolParkingCartPricingTest extends TestCase
|
|||
$this->assertNotNull($item500);
|
||||
$this->assertEquals(2, $item500->quantity);
|
||||
$this->assertEquals($poolPriceId, $item500->price_id);
|
||||
|
||||
|
||||
// Cart item with price 1000 should have Spot 3's price_id
|
||||
$spot3PriceId = $spots[2]->defaultPrice()->first()->id;
|
||||
$item1000 = $items->first(fn($i) => $i->price === 1000);
|
||||
|
|
@ -538,9 +538,9 @@ class PoolParkingCartPricingTest extends TestCase
|
|||
// - 1 cart item with Spot 2 (qty 2): price 500, price_id from pool
|
||||
// - 1 cart item with Spot 3 (qty 2): price 500, price_id from pool
|
||||
// Total: 3 cart items
|
||||
|
||||
|
||||
$this->assertCount(3, $items);
|
||||
|
||||
|
||||
// First cart item (price 300) should have Spot 1's price_id
|
||||
$item300 = $items->first(fn($i) => $i->price === 300);
|
||||
$this->assertNotNull($item300);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class PoolProductPriceIdTest extends TestCase
|
|||
// Check product_id column contains allocated single item id
|
||||
$this->assertNotNull($cartItem->product_id);
|
||||
$this->assertEquals($this->singleItem1->id, $cartItem->product_id);
|
||||
|
||||
|
||||
// Meta should still have the name for display purposes
|
||||
$meta = $cartItem->getMeta();
|
||||
$this->assertEquals($this->singleItem1->name, $meta->allocated_single_item_name);
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ class StockAttributesTest extends TestCase
|
|||
|
||||
// available_stocks accounts for DECREASE
|
||||
$this->assertEquals(80, $product->available_stocks);
|
||||
|
||||
|
||||
// max_stocks ignores DECREASE (shows ceiling/capacity)
|
||||
$this->assertEquals(100, $product->max_stocks);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue