LP#1402797 browser client interval parser
[working/Evergreen.git] / Open-ILS / web / js / ui / default / staff / test / unit / egDate.js
1 'use strict';
2
3 describe('egDate', function(){
4     beforeEach(module('egCoreMod'));
5
6     it('should parse a simple interval', inject(function(egDate) {
7         expect(egDate.intervalToSeconds('2 days')).toBe(172800);
8     }));
9
10     it('should parse a combined interval', inject(function(egDate) {
11         expect(egDate.intervalToSeconds('1 min 2 seconds')).toBe(62);
12     }));
13
14     it('should parse a time interval', inject(function(egDate) {
15         expect(egDate.intervalToSeconds('02:00:23')).toBe(7223);
16     }));
17
18 });