mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
27 lines
697 B
JavaScript
27 lines
697 B
JavaScript
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(){
|
|
$.each([
|
|
'show',
|
|
'hide',
|
|
'setValue',
|
|
'place'
|
|
], $.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));
|
|
});
|