2015-04-28 21:00:24 -06:00
|
|
|
'use strict';
|
2015-03-03 00:46:11 +00:00
|
|
|
define([
|
|
|
|
'QUnit',
|
|
|
|
'jquery',
|
|
|
|
'gridster'
|
|
|
|
], function(QUnit, $, gridster) {
|
|
|
|
|
2015-04-28 21:00:24 -06:00
|
|
|
QUnit.module('Gridster AMD', {
|
2015-03-03 00:46:11 +00:00
|
|
|
setup: function () {
|
|
|
|
},
|
|
|
|
teardown: function () {
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
QUnit.test('window.$ should be undefined.', function() {
|
|
|
|
equal(typeof window.$, 'undefined', 'window.$ should be undefined');
|
|
|
|
equal(typeof window.jQuery, 'undefined', 'window.jQuery should be undefined');
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
QUnit.test('gridster should be initialized.', function() {
|
|
|
|
$('.wrapper ul').gridster();
|
2015-04-28 21:00:24 -06:00
|
|
|
equal($('.wrapper').hasClass('ready'), true, 'Gridster should initialized wrapper.');
|
|
|
|
equal($('.wrapper ul li').length, $('.gs-w').length, 'grid elements get a .gs-w class');
|
2015-03-03 00:46:11 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|