Merge pull request #5184 from Matt-Yorkley/inventory-loading

Inventory loading
This commit is contained in:
Luis Ramos
2020-04-09 13:26:12 +01:00
committed by GitHub
7 changed files with 115 additions and 27 deletions

View File

@@ -51,9 +51,9 @@ describe "VariantOverridesCtrl", ->
it "adds products", ->
spyOn(VariantOverrides, "ensureDataFor")
expect(scope.products).toEqual []
scope.addProducts ['a', 'b']
scope.addProducts { products: ['a', 'b'] }
expect(scope.products).toEqual ['a', 'b']
scope.addProducts ['c', 'd']
scope.addProducts { products: ['c', 'd'] }
expect(scope.products).toEqual ['a', 'b', 'c', 'd']
expect(VariantOverrides.ensureDataFor).toHaveBeenCalled()