summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStephen Vance <steve@vance.com>2013-07-28 19:33:53 -0400
committerStephen Vance <steve@vance.com>2013-07-28 19:33:53 -0400
commitf46683ce470fc632585ecd8ff673e7555a35c454 (patch)
treeb0a98fc55866954f9155ad92943701ada73065b4 /test
parentd787f1521311357f67dde0857a3b6ae12ec4f360 (diff)
downloadjQuery-Timepicker-Addon-f46683ce470fc632585ecd8ff673e7555a35c454.zip
jQuery-Timepicker-Addon-f46683ce470fc632585ecd8ff673e7555a35c454.tar.gz
jQuery-Timepicker-Addon-f46683ce470fc632585ecd8ff673e7555a35c454.tar.bz2
Preserve leading and trailing whitespace. Don't second guess the developer who specified whitespace in their format.
Diffstat (limited to 'test')
-rw-r--r--test/jquery-ui-timepicker-addon_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/jquery-ui-timepicker-addon_spec.js b/test/jquery-ui-timepicker-addon_spec.js
index b7c7c68..1539475 100644
--- a/test/jquery-ui-timepicker-addon_spec.js
+++ b/test/jquery-ui-timepicker-addon_spec.js
@@ -636,6 +636,16 @@ describe('datetimepicker', function() {
});
});
});
+
+ describe('preserves whitespace in formats', function() {
+ it('preserves leading whitespace', function() {
+ expect($.datepicker.formatTime(' H', {hour: 3})).toBe(' 3');
+ });
+
+ it('preserves trailing whitespace', function() {
+ expect($.datepicker.formatTime('H ', {hour: 3})).toBe('3 ');
+ });
+ });
});
});
}); \ No newline at end of file