mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fixing customers controller spec
This commit is contained in:
@@ -12,11 +12,11 @@ describe "CustomersCtrl", ->
|
||||
Customers = _Customers_
|
||||
ctrl = $controller 'customersCtrl', {$scope: scope, Customers: Customers, shops: shops}
|
||||
|
||||
describe "initialise()", ->
|
||||
describe "setting the shop on scope", ->
|
||||
beforeEach ->
|
||||
spyOn(Customers, "index").andReturn "list of customers"
|
||||
scope.shop = {id: 1}
|
||||
scope.initialise()
|
||||
scope.$apply ->
|
||||
scope.shop = {id: 1}
|
||||
|
||||
it "calls Customers#index with the correct params", ->
|
||||
expect(Customers.index).toHaveBeenCalledWith({enterprise_id: 1})
|
||||
|
||||
Reference in New Issue
Block a user