Provide hub permissions to specs

This commit is contained in:
Rohan Mitchell
2014-11-27 10:00:28 +11:00
parent efae9265c1
commit 42481e9691

View File

@@ -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