aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bower_components/bootstrap-datepicker/tests/suites/methods_jquery.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bower_components/bootstrap-datepicker/tests/suites/methods_jquery.js')
-rw-r--r--public/bower_components/bootstrap-datepicker/tests/suites/methods_jquery.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/public/bower_components/bootstrap-datepicker/tests/suites/methods_jquery.js b/public/bower_components/bootstrap-datepicker/tests/suites/methods_jquery.js
new file mode 100644
index 0000000..e934d49
--- /dev/null
+++ b/public/bower_components/bootstrap-datepicker/tests/suites/methods_jquery.js
@@ -0,0 +1,26 @@
+module('Methods (jQuery)', {
+ setup: function(){
+ this.$inputs = $('<input><input>')
+ .datepicker()
+ .appendTo('#qunit-fixture');
+ },
+ teardown: function(){
+ this.$inputs.each(function(){
+ $.data(this, 'datepicker').picker.remove();
+ });
+ }
+});
+
+test('Methods', function(){
+ [
+ 'show',
+ 'hide',
+ 'setValue',
+ 'place'
+ ].forEach($.proxy(function(index, value){
+ var returnedObject = this.$inputs.datepicker(value);
+
+ strictEqual(returnedObject, this.$inputs, "is jQuery element");
+ strictEqual(returnedObject.length, 2, "correct length of jQuery elements");
+ }, this));
+});