[Plot] Update spec

Update spec for PlotController to account for usage of the
throttle service, WTD-1202.
This commit is contained in:
Victor Woeltjen 2015-06-10 17:02:16 -07:00
parent 35b5fbefd0
commit 500d88b5a1

View File

@ -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(
});
});
}
);
);