|
|
@@ -7,13 +7,13 @@ describe('FCMoment::time', function() {
|
|
|
|
|
|
it('should return 00:00 for a moment with 00:00 time', function() {
|
|
|
var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00');
|
|
|
- var time = mom.timeDuration();
|
|
|
+ var time = mom.time();
|
|
|
expect(time).toEqualDuration('00:00');
|
|
|
});
|
|
|
|
|
|
it('should return the time of a moment with a time', function() {
|
|
|
var mom = $.fullCalendar.moment.utc('2014-06-08T07:30:00');
|
|
|
- var time = mom.timeDuration();
|
|
|
+ var time = mom.time();
|
|
|
expect(time).toEqualDuration('07:30');
|
|
|
});
|
|
|
});
|
|
|
@@ -28,21 +28,21 @@ describe('FCMoment::time', function() {
|
|
|
it('should give a moment with 00:00 a time', function() {
|
|
|
var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00');
|
|
|
var dur = moment.duration('13:25');
|
|
|
- mom.timeDuration(dur);
|
|
|
+ mom.time(dur);
|
|
|
expect(mom).toEqualMoment('2014-06-08T13:25:00+00:00');
|
|
|
});
|
|
|
|
|
|
it('should overwrite the time of a moment with a time', function() {
|
|
|
var mom = $.fullCalendar.moment.utc('2014-06-08T05:00:00');
|
|
|
var dur = moment.duration('13:25');
|
|
|
- mom.timeDuration(dur);
|
|
|
+ mom.time(dur);
|
|
|
expect(mom).toEqualMoment('2014-06-08T13:25:00+00:00');
|
|
|
});
|
|
|
|
|
|
it('should move to next day if greater than 24 hours', function() {
|
|
|
var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00');
|
|
|
var dur = moment.duration('1.01:00:00'); // 1 day, 1 hour
|
|
|
- mom.timeDuration(dur);
|
|
|
+ mom.time(dur);
|
|
|
expect(mom).toEqualMoment('2014-06-09T01:00:00+00:00');
|
|
|
});
|
|
|
});
|
|
|
@@ -52,14 +52,14 @@ describe('FCMoment::time', function() {
|
|
|
it('should give a moment with 00:00 a time', function() {
|
|
|
var mom1 = $.fullCalendar.moment.utc('2014-06-09T00:00:00');
|
|
|
var mom2 = $.fullCalendar.moment.utc('2014-07-22T05:30:00'); // a Tues, so .days() -> 2
|
|
|
- mom1.timeDuration(mom2);
|
|
|
+ mom1.time(mom2);
|
|
|
expect(mom1).toEqualMoment('2014-06-09T05:30:00+00:00');
|
|
|
});
|
|
|
|
|
|
it('should overwrite the time of a moment with a time', function() {
|
|
|
var mom1 = $.fullCalendar.moment.utc('2014-06-09T04:15:00');
|
|
|
var mom2 = $.fullCalendar.moment.utc('2014-07-22T05:30:00'); // a Tues, so .days() -> 2
|
|
|
- mom1.timeDuration(mom2);
|
|
|
+ mom1.time(mom2);
|
|
|
expect(mom1).toEqualMoment('2014-06-09T05:30:00+00:00');
|
|
|
});
|
|
|
});
|