From 23b64951f35bdbcd05b5e948dda19d362c7849fe Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 2 Jun 2016 16:42:09 -0700 Subject: [PATCH] [Timeline] Update zoom controller spec ...to reflect changes/simplifications for #936. --- .../test/controllers/TimelineZoomControllerSpec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/features/timeline/test/controllers/TimelineZoomControllerSpec.js b/platform/features/timeline/test/controllers/TimelineZoomControllerSpec.js index e037c689d4..40ed8c6c61 100644 --- a/platform/features/timeline/test/controllers/TimelineZoomControllerSpec.js +++ b/platform/features/timeline/test/controllers/TimelineZoomControllerSpec.js @@ -38,6 +38,7 @@ define( }; mockScope = jasmine.createSpyObj("$scope", ['$watch']); mockScope.commit = jasmine.createSpy('commit'); + mockScope.scroll = { x: 0, width: 1000 }; mockTimeout = jasmine.createSpy('$timeout'); controller = new TimelineZoomController( mockScope, @@ -67,11 +68,6 @@ define( expect(controller.zoom()).toEqual(3500); }); - it("observes scroll bounds", function () { - expect(mockScope.$watch) - .toHaveBeenCalledWith("scroll", jasmine.any(Function)); - }); - describe("when watches have fired", function () { var mockDomainObject, mockPromise, @@ -112,6 +108,10 @@ define( mockScope.$watch.calls.forEach(function (call) { call.args[1](mockScope[call.args[0]]); }); + + mockTimeout.calls.forEach(function (call) { + call.args[0](); + }); }); it("zooms to fit the timeline", function () {