From 500d88b5a195691f5bae2bfcb9f8558844f590ca Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 10 Jun 2015 17:02:16 -0700 Subject: [PATCH] [Plot] Update spec Update spec for PlotController to account for usage of the throttle service, WTD-1202. --- platform/features/plot/test/PlotControllerSpec.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/platform/features/plot/test/PlotControllerSpec.js b/platform/features/plot/test/PlotControllerSpec.js index 1cd4b43331..138071d339 100644 --- a/platform/features/plot/test/PlotControllerSpec.js +++ b/platform/features/plot/test/PlotControllerSpec.js @@ -33,6 +33,7 @@ define( var mockScope, mockFormatter, mockHandler, + mockThrottle, mockHandle, mockDomainObject, mockSeries, @@ -56,6 +57,7 @@ define( "telemetrySubscriber", ["handle"] ); + mockThrottle = jasmine.createSpy("throttle"); mockHandle = jasmine.createSpyObj( "subscription", [ @@ -73,12 +75,18 @@ define( ); mockHandler.handle.andReturn(mockHandle); + mockThrottle.andCallFake(function (fn) { return fn; }); mockHandle.getTelemetryObjects.andReturn([mockDomainObject]); mockHandle.getMetadata.andReturn([{}]); mockHandle.getDomainValue.andReturn(123); mockHandle.getRangeValue.andReturn(42); - controller = new PlotController(mockScope, mockFormatter, mockHandler); + controller = new PlotController( + mockScope, + mockFormatter, + mockHandler, + mockThrottle + ); }); it("provides plot colors", function () { @@ -224,4 +232,4 @@ define( }); }); } -); \ No newline at end of file +);