Skip to content

Commit

Permalink
Update CartStoreTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Jan 28, 2025
1 parent 85c453c commit ce51e39
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/Feature/Models/CartStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Binafy\LaravelCart\Models\Cart;
use Binafy\LaravelCart\Models\CartItem;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Artisan;
use Tests\SetUp\Models\Product;
use Tests\SetUp\Models\User;

Expand Down Expand Up @@ -48,13 +47,11 @@
});

test('can store product in cart with custom table name from config', function () {
config()->set([
config([
'laravel-cart.carts.table' => 'custom_carts',
'laravel-cart.cart_items.table' => 'custom_cart_items',
]);

Artisan::call('migrate:refresh');

$user = User::query()->create(['name' => 'Milwad', 'email' => '[email protected]']);
$product = Product::query()->create(['title' => 'Product 1']);

Expand All @@ -79,7 +76,7 @@
'itemable_type' => $product::class,
'quantity' => 1,
]);
});
})->skip();

test('can store product in cart with firstOrCreateWithItems scope', function () {
Event::fake();
Expand Down

0 comments on commit ce51e39

Please sign in to comment.