diff options
author | Stephen Vance <steve@vance.com> | 2013-07-14 15:25:14 -0400 |
---|---|---|
committer | Stephen Vance <steve@vance.com> | 2013-07-14 15:25:14 -0400 |
commit | f3456ce4d7fcb75a2da82c55a412167ff85681db (patch) | |
tree | 438d47c0b381a25f47fa05dc1b2a2d14baddcc43 /test | |
parent | 353ff5efbe1786d09f8043d6c9ef353b5272ce84 (diff) | |
download | jQuery-Timepicker-Addon-f3456ce4d7fcb75a2da82c55a412167ff85681db.zip jQuery-Timepicker-Addon-f3456ce4d7fcb75a2da82c55a412167ff85681db.tar.gz jQuery-Timepicker-Addon-f3456ce4d7fcb75a2da82c55a412167ff85681db.tar.bz2 |
Now that the basic time and date parsing functions are test protected, make splitDateTime() return an object instead of an array to simplify the code a bit.
Diffstat (limited to 'test')
-rw-r--r-- | test/jquery-ui-timepicker-addon_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/jquery-ui-timepicker-addon_spec.js b/test/jquery-ui-timepicker-addon_spec.js index 1421b72..3cd4554 100644 --- a/test/jquery-ui-timepicker-addon_spec.js +++ b/test/jquery-ui-timepicker-addon_spec.js @@ -206,7 +206,7 @@ describe('datetimepicker', function() { result = $.timepicker._util._splitDateTime('', inputDateTimeString, {}, {}); - expect(result).toEqual([expectedDateString, expectedTimeString]); + expect(result).toEqual({dateString: expectedDateString, timeString: expectedTimeString}); }); it('splits a date and time into its parts using a supplied separator', function() { @@ -216,7 +216,7 @@ describe('datetimepicker', function() { result = $.timepicker._util._splitDateTime('', inputDateTimeString, {}, {separator: separator}); - expect(result).toEqual([expectedDateString, expectedTimeString]); + expect(result).toEqual({dateString: expectedDateString, timeString: expectedTimeString}); }); it('splits a date and time into its parts when there are multiple separators in the time format', function() { @@ -229,13 +229,13 @@ describe('datetimepicker', function() { result = $.timepicker._util._splitDateTime('', inputDateTimeString, {}, timeSettings); - expect(result).toEqual([expectedDateString, alternateTimeString]); + expect(result).toEqual({dateString: expectedDateString, timeString: alternateTimeString}); }); it('splits only a date into itself', function() { var result = $.timepicker._util._splitDateTime('', expectedDateString, {}, {}); - expect(result).toEqual([expectedDateString, '']); + expect(result).toEqual({dateString: expectedDateString, timeString: ''}); }); // TODO: Should test the error path, but not sure what throws the error or what the message looks like. |