spec updates

This commit is contained in:
Andy Brett
2020-11-29 15:03:30 -08:00
parent c70ea44091
commit b713bd7aa7
3 changed files with 11 additions and 7 deletions

View File

@@ -138,10 +138,10 @@ describe 'Cart service', ->
expect(Cart.popQueue).not.toHaveBeenCalled()
it "shows an error on cart update failure", ->
$httpBackend.expectPOST("/cart/populate", data).respond 404, {}
$httpBackend.expectPOST("/cart/populate", data).respond 412, {}
Cart.update()
$httpBackend.flush()
expect(RailsFlashLoader.loadFlash).toHaveBeenCalledWith({error: t('js.cart.add_to_cart_failed')})
expect(RailsFlashLoader.loadFlash).toHaveBeenCalled()
describe "verifying stock levels after update", ->
describe "when an item is out of stock", ->