Fix various import issues: currentHub

This commit is contained in:
Jean-Baptiste Bellet
2023-02-03 16:25:13 +01:00
parent 292338d467
commit a486a08bfc
3 changed files with 13 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ describe 'ProductsCtrl', ->
Cart = {}
Taxons = null
Properties = null
currentHub = null
beforeEach ->
module('Darkswarm')
@@ -19,10 +20,12 @@ describe 'ProductsCtrl', ->
Taxons:
taxons: []
Properties: {}
currentHub =
id: 1
inject ($rootScope, $controller) ->
scope = $rootScope
ctrl = $controller 'ProductsCtrl', {$scope: scope, Products: Products, OrderCycle: OrderCycle, Cart: Cart, Taxons: Taxons, Properties: Properties}
ctrl = $controller 'ProductsCtrl', {$scope: scope, Products: Products, OrderCycle: OrderCycle, Cart: Cart, Taxons: Taxons, Properties: Properties, currentHub: currentHub}
it 'fetches products from Products', ->
expect(scope.Products.products).toEqual ['testy mctest']