mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Provide hub permissions to specs
This commit is contained in:
@@ -4,6 +4,7 @@ describe "OverrideVariantsCtrl", ->
|
||||
hubs = [{id: 1, name: 'Hub'}]
|
||||
producers = [{id: 2, name: 'Producer'}]
|
||||
products = [{id: 1, name: 'Product'}]
|
||||
hubPermissions = {}
|
||||
|
||||
beforeEach ->
|
||||
module 'ofn.admin'
|
||||
@@ -13,7 +14,7 @@ describe "OverrideVariantsCtrl", ->
|
||||
scope = {}
|
||||
|
||||
inject ($controller, Indexer) ->
|
||||
ctrl = $controller 'AdminOverrideVariantsCtrl', {$scope: scope, Indexer: Indexer, hubs: hubs, producers: producers, products: products}
|
||||
ctrl = $controller 'AdminOverrideVariantsCtrl', {$scope: scope, Indexer: Indexer, hubs: hubs, producers: producers, products: products, hubPermissions: hubPermissions}
|
||||
|
||||
it "initialises the hub list and the chosen hub", ->
|
||||
expect(scope.hubs).toEqual hubs
|
||||
|
||||
Reference in New Issue
Block a user