diff --git a/tests/Feature/Models/CartOptionTest.php b/tests/Feature/Models/CartItemOptionTest.php similarity index 79% rename from tests/Feature/Models/CartOptionTest.php rename to tests/Feature/Models/CartItemOptionTest.php index 7a492c3..85cb699 100644 --- a/tests/Feature/Models/CartOptionTest.php +++ b/tests/Feature/Models/CartItemOptionTest.php @@ -25,5 +25,9 @@ $cart->storeItem($product1); // Set options - $cart->setOption($option); + $cart->items()->first()->setOption('size', 34); + + // DB Assertions + assertDatabaseCount('cart_items', 1); + \Pest\Laravel\assertDatabaseHas('cart_items', ['options' => $cart->items()->first()->getOption('size')]); });