mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Fix various import issues: currentHub
This commit is contained in:
@@ -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']
|
||||
|
||||
@@ -3,6 +3,7 @@ describe 'Checkout service', ->
|
||||
notify: (arg) ->
|
||||
Checkout = null
|
||||
orderData = null
|
||||
currentHub = null
|
||||
$httpBackend = null
|
||||
Navigation = null
|
||||
navigationSpy = null
|
||||
@@ -49,6 +50,9 @@ describe 'Checkout service', ->
|
||||
lastname: "Harrington"
|
||||
ship_address: {test: "bar"}
|
||||
user_id: 901
|
||||
currentHub =
|
||||
hub:
|
||||
id: 99
|
||||
|
||||
window.Bugsnag = BugsnagMock
|
||||
|
||||
@@ -58,6 +62,7 @@ describe 'Checkout service', ->
|
||||
$provide.value "Loading", Loading
|
||||
$provide.value "currentOrder", orderData
|
||||
$provide.value "shippingMethods", shippingMethods
|
||||
$provide.value "currentHub", currentHub
|
||||
$provide.value "paymentMethods", paymentMethods
|
||||
$provide.value "StripeInstancePublishableKey", "instance_publishable_key"
|
||||
null
|
||||
|
||||
@@ -8,6 +8,7 @@ describe 'Products service', ->
|
||||
Cart = null
|
||||
shopfront = null
|
||||
currentOrder = null
|
||||
currentHub = null
|
||||
product = null
|
||||
productWithImage = null
|
||||
properties = null
|
||||
@@ -33,6 +34,8 @@ describe 'Products service', ->
|
||||
]
|
||||
currentOrder =
|
||||
line_items: []
|
||||
currentHub =
|
||||
id: 1
|
||||
properties =
|
||||
{ id: 1, name: "some property" }
|
||||
taxons =
|
||||
@@ -51,6 +54,7 @@ describe 'Products service', ->
|
||||
module ($provide)->
|
||||
$provide.value "shopfront", shopfront
|
||||
$provide.value "currentOrder", currentOrder
|
||||
$provide.value "currentHub", currentHub
|
||||
$provide.value "taxons", taxons
|
||||
$provide.value "properties", properties
|
||||
$provide.value "GmapsGeo", GmapsGeo
|
||||
|
||||
Reference in New Issue
Block a user