Initial commit
This commit is contained in:
29
public/assets/vendor/select2-4.1.0-rc.0/tests/data/base-tests.js
vendored
Executable file
29
public/assets/vendor/select2-4.1.0-rc.0/tests/data/base-tests.js
vendored
Executable file
@ -0,0 +1,29 @@
|
||||
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'
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user