aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bower_components/bootstrap-datepicker/tests/suites/inline.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bower_components/bootstrap-datepicker/tests/suites/inline.js')
-rw-r--r--public/bower_components/bootstrap-datepicker/tests/suites/inline.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/public/bower_components/bootstrap-datepicker/tests/suites/inline.js b/public/bower_components/bootstrap-datepicker/tests/suites/inline.js
new file mode 100644
index 0000000..e2b7e9c
--- /dev/null
+++ b/public/bower_components/bootstrap-datepicker/tests/suites/inline.js
@@ -0,0 +1,28 @@
+module('Inline', {
+ setup: function(){
+ this.component = $('<div data-date="12-02-2012"></div>')
+ .appendTo('#qunit-fixture')
+ .datepicker({format: "dd-mm-yyyy"});
+ this.dp = this.component.data('datepicker');
+ this.picker = this.dp.picker;
+ },
+ teardown: function(){
+ this.picker.remove();
+ }
+});
+
+
+test('Picker gets date/viewDate from data-date attr', function(){
+ datesEqual(this.dp.dates[0], UTCDate(2012, 1, 12));
+ datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12));
+});
+
+
+test('Visible after init', function(){
+ ok(this.picker.is(':visible'));
+});
+
+test('update', function(){
+ this.dp.update('13-03-2012');
+ datesEqual(this.dp.dates[0], UTCDate(2012, 2, 13));
+});