mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-30 07:59:50 -08:00
30 lines
667 B
JavaScript
30 lines
667 B
JavaScript
|
module('Data adapters - Base');
|
||
|
|
||
|
var BaseData = require('select2/data/base');
|
||
|
var $ = require('jquery');
|
||
|
var Options = require('select2/options');
|
||
|
|
||
|
var options = new Options({});
|
||
|
|
||
|
test('current is required', function (assert) {
|
||
|
var data = new BaseData($('#qunit-fixture select'), options);
|
||
|
|
||
|
assert.throws(
|
||
|
function () {
|
||
|
data.current(function () {});
|
||
|
},
|
||
|
'current has no default implementation'
|
||
|
);
|
||
|
});
|
||
|
|
||
|
test('query is required', function (assert) {
|
||
|
var data = new BaseData($('#qunit-fixture select'), options);
|
||
|
|
||
|
assert.throws(
|
||
|
function () {
|
||
|
data.query({}, function () {});
|
||
|
},
|
||
|
'query has no default implementation'
|
||
|
);
|
||
|
});
|