 
         scope.submitProducts()
 
-      it 'packs all products and all dirty products', ->
+      it "packs all products and all dirty products", ->
         expect(scope.packProduct.calls.length).toEqual 4
 
       it "filters returned dirty products", ->

      price: 10
    ]

  it 'returns variant_unit_with_scale as variant_unit and variant_unit_scale', ->
    testProduct =
      id: 1
      variant_unit: 'weight'

      expect(scope.unpackProduct.calls.length).toEqual 2


  describe "preparing products", ->
    beforeEach ->
      spyOn scope, "matchSupplier"
      spyOn scope, "loadVariantUnit"

    it "initialises display properties for the product", ->
      product = {id: 123}
      scope.displayProperties = {}
      scope.unpackProduct product
      expect(scope.displayProperties[123]).toEqual {showVariants: false}

    it "calls matchSupplier for the product", ->
      product = {id: 123}
      scope.displayProperties = {}
      scope.unpackProduct product
      expect(scope.matchSupplier.calls.length).toEqual 1

    it "calls loadVariantUnit for the product", ->
      product = {id: 123}
      scope.displayProperties = {}
      scope.unpackProduct product
