SelectFilter2.test.js 666 B

1234567891011121314
  1. module('admin.SelectFilter2');
  2. test('init', function(assert) {
  3. var $ = django.jQuery;
  4. $('<form><select id="id"></select></form>').appendTo('#qunit-fixture');
  5. $('<option value="0">A</option>').appendTo('#id');
  6. SelectFilter.init('id', 'things', 0);
  7. assert.equal($('.selector-available h2').text().trim(), "Available things");
  8. assert.equal($('.selector-chosen h2').text().trim(), "Chosen things");
  9. assert.equal($('.selector-chooseall').text(), "Choose all");
  10. assert.equal($('.selector-add').text(), "Choose");
  11. assert.equal($('.selector-remove').text(), "Remove");
  12. assert.equal($('.selector-clearall').text(), "Remove all");
  13. });