Sha256: a89cda5bfbfa93e504f58cd5eab05df8fbcb0b46091607dbe7569594cd35d9ae

Contents?: true

Size: 1.06 KB

Versions: 62

Compression:

Stored size: 1.06 KB

Contents

(function () {
    'use strict';

    describe('WORKAREA.remoteSelects', function () {
        describe('init', function () {
            it('adds a hidden input before the select', function () {
                var markup = 'remote_select.html',
                    $fixture = $(fixture.load(markup, true)),

                    $select = $('select', $fixture),
                    inputName = $select.attr('name');

                WORKAREA.remoteSelects.init($fixture);

                expect($select.prev().attr('type')).to.equal('hidden');
                expect($select.prev().attr('name')).to.equal(inputName);
            });

            it('configures the default settings of the instance', function () {
                var markup = 'remote_select.html',
                    $fixture = $(fixture.load(markup, true)),
                    $input;

                WORKAREA.remoteSelects.init($fixture);

                $input = $('.select2-search__field', $fixture);

                expect($input.attr('placeholder')).to.equal('Baz');
            });
        });
    });
}());

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.26 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.45 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.25 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.23 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.44 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.22 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.43 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.21 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.42 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.20 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.41 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.19 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.40 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.18 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.39 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.17 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.38 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.16 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.37 test/javascripts/remove_selects_spec.js