 
     it 'should resolve with empty array on undefined list of product category references', (done) ->
       @import._resolveProductCategories(undefined)
-      .then (result) =>
+      .then (result) ->
         expect(result).toBe undefined
         done()
       .catch done
 
     it 'should resolve with empty array on empty list of product category references', (done) ->
       @import._resolveProductCategories([])
-      .then (result) =>
+      .then (result) ->
         expect(result).toBe undefined
         done()
       .catch done

  describe '::_prepareNewProduct', ->

    beforeEach ->
      spyOn(@import, "_resolveReference").andCallFake (service, refKey, ref) =>
        switch refKey
          when "productType"
            if ref then Promise.resolve(sampleProductTypeResponse.body.results[0].id) else Promise.resolve()

    it 'should resolve reference from cache', (done) ->
      @import._resetCache()
      @import._cache.taxCategory['defaultTax_AT'] = "tax_category_internal_id"
      spyOn(@import.client.taxCategories, "fetch").andCallFake -> Promise.resolve(sampleTaxCategoryResponse)
      taxCategoryRef = { id: 'defaultTax_AT' }
      @import._resolveReference(@import.client.taxCategories, 'taxCategory', taxCategoryRef, "name=\"#{taxCategoryRef.id}\"")
      .then (result) =>
