|
|
@@ -75,6 +75,14 @@ define([
|
|
|
expect(time.to.valueOf()).to.equal(1410337665699);
|
|
|
});
|
|
|
|
|
|
+ it('should handle bad dates', function() {
|
|
|
+ ctx.$routeParams.from = '20151126T00010%3C%2Fp%3E%3Cspan%20class';
|
|
|
+ ctx.$routeParams.to = 'now';
|
|
|
+ _dashboard.time.from = 'now-6h';
|
|
|
+ ctx.service.init(_dashboard);
|
|
|
+ expect(ctx.service.time.from).to.equal('now-6h');
|
|
|
+ expect(ctx.service.time.to).to.equal('now');
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
describe('setTime', function() {
|