From 90dff75a73356b7e8382b5c31a79a13476aeb08a Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Fri, 30 May 2014 18:48:44 -0700 Subject: [PATCH] navigation test also tests getDate --- tests/automated/navigation.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/automated/navigation.js b/tests/automated/navigation.js index 7f8002e..77dfe55 100644 --- a/tests/automated/navigation.js +++ b/tests/automated/navigation.js @@ -1,4 +1,4 @@ -describe('navigation', function() { +describe('current date', function() { var TITLE_FORMAT = 'MMMM D YYYY'; var options; @@ -11,13 +11,15 @@ describe('navigation', function() { }; }); - describe('defaultDate', function() { + describe('defaultDate & getDate', function() { describeWhenInMonth(function() { it('should initialize at the date', function() { options.defaultDate = '2011-03-10'; $('#cal').fullCalendar(options); expectViewDates('2011-02-27', '2011-04-10', '2011-03-01'); - expect($('#cal').fullCalendar('getDate')).toEqualMoment('2011-03-10'); + var currentDate = $('#cal').fullCalendar('getDate'); + expect(moment.isMoment(currentDate)).toEqual(true); // test the type, but only here + expect(currentDate).toEqualMoment('2011-03-10'); }); }); describeWhenInWeek(function() {