Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/js_tests/admin/SelectFilter2.test.js
blob: 1aa97958cb06a79e6097e069a466c3dba3d449cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* global module, test, SelectFilter */
/* eslint global-strict: 0, strict: 0 */
'use strict';

module('admin.SelectFilter2');

test('init', function(assert) {
    var $ = django.jQuery;
    $('<form><select id="id"></select></form>').appendTo('#qunit-fixture');
    $('<option value="0">A</option>').appendTo('#id');
    SelectFilter.init('id', 'things', 0);
    assert.equal($('.selector-available h2').text().trim(), "Available things");
    assert.equal($('.selector-chosen h2').text().trim(), "Chosen things");
    assert.equal($('.selector-chooseall').text(), "Choose all");
    assert.equal($('.selector-add').text(), "Choose");
    assert.equal($('.selector-remove').text(), "Remove");
    assert.equal($('.selector-clearall').text(), "Remove all");
});