[Time] Add test cases for URL handler

To reproduce root cause of nasa/openmct-tutorial#14
This commit is contained in:
Victor Woeltjen 2017-06-22 12:40:02 -07:00
parent 7fcaf6510e
commit ce733628b2

View File

@ -97,6 +97,21 @@ define(['./TimeSettingsURLHandler'], function (TimeSettingsURLHandler) {
});
});
describe("when " + event + " time event occurs with no time system", function () {
beforeEach(function () {
time.timeSystem.andReturn(undefined);
time.on.calls.forEach(function (call) {
if (call.args[0] === event) {
call.args[1]();
}
});
});
it("clears the time system from the URL", function () {
expect(search['tc.timeSystem']).toBeUndefined();
});
});
describe("when " + event + " time event occurs with a clock", function () {
var expected;