fix(cart): hide Edit when there is nothing to configure
Drops the mount() change and its test, as suggested in review.
This commit is contained in:
1 parent
21685acdc9
commit
0b257a4761
3 files changed
+3
-23
No files matched your search
@@ -72,28 +72,6 @@ class CheckoutTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_checkout_page_does_not_redirect_if_one_plan_when_editing_cart_item(): void
|
||||
{
|
||||
$this->get(route('products.checkout', [
|
||||
$this->product->product->category->slug,
|
||||
$this->product->product->slug,
|
||||
]))->assertRedirect(route('cart'));
|
||||
|
||||
$cart = Cart::where('currency_code', 'USD')->firstOrFail();
|
||||
$item = $cart->items()->firstOrFail();
|
||||
|
||||
Once::flush();
|
||||
|
||||
$response = $this->withCookie('cart', $cart->ulid)->get(route('products.checkout', [
|
||||
$this->product->product->category->slug,
|
||||
$this->product->product->slug,
|
||||
'edit' => $item->id,
|
||||
]));
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee($this->product->product->name);
|
||||
}
|
||||
|
||||
public function test_checkout_page_with_multiple_plans(): void
|
||||
{
|
||||
// Add plan
|
||||
|
||||
Reference in new issue
Block a user