Added test to confirm bugfix in 5af3e90228

This commit is contained in:
Rob Gloudemans
2016-05-19 15:21:13 +02:00
parent 5af3e90228
commit bd7a2ce807

View File

@@ -246,6 +246,21 @@ class CartTest extends Orchestra\Testbench\TestCase
$this->assertRowsInCart(1, $cart);
}
/** @test */
public function it_will_keep_updating_the_quantity_when_an_item_is_added_multiple_times()
{
$cart = $this->getCart();
$item = $this->getBuyableMock();
$cart->add($item);
$cart->add($item);
$cart->add($item);
$this->assertItemsInCart(3, $cart);
$this->assertRowsInCart(1, $cart);
}
/** @test */
public function it_can_update_the_quantity_of_an_existing_item_in_the_cart()
{