From 09160c8ea67768afeca2c54a186586b29da4796e Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Wed, 3 Jun 2015 15:23:55 +0800 Subject: [PATCH] Fixing customers controller spec --- .../controllers/customers_controller_spec.js.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/javascripts/unit/admin/customers/controllers/customers_controller_spec.js.coffee b/spec/javascripts/unit/admin/customers/controllers/customers_controller_spec.js.coffee index ced19c8b33..22777a6528 100644 --- a/spec/javascripts/unit/admin/customers/controllers/customers_controller_spec.js.coffee +++ b/spec/javascripts/unit/admin/customers/controllers/customers_controller_spec.js.coffee @@ -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})