1
0
mirror of synced 2024-11-28 23:56:03 +03:00
select2/tests/data/base-tests.js

30 lines
667 B
JavaScript
Raw Normal View History

2014-09-21 23:33:24 +04:00
module('Data adapters - Base');
2014-09-21 23:33:24 +04:00
var BaseData = require('select2/data/base');
var $ = require('jquery');
var Options = require('select2/options');
var options = new Options({});
2014-09-21 23:33:24 +04:00
test('current is required', function (assert) {
var data = new BaseData($('#qunit-fixture select'), options);
assert.throws(
function () {
data.current(function () {});
},
2014-09-21 23:33:24 +04:00
'current has no default implementation'
);
});
2014-09-21 23:33:24 +04:00
test('query is required', function (assert) {
var data = new BaseData($('#qunit-fixture select'), options);
assert.throws(
function () {
data.query({}, function () {});
},
2014-09-21 23:33:24 +04:00
'query has no default implementation'
);
});