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.4.27 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.4 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.26 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.3 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.25 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.2 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.24 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.1 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.23 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.22 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.0 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.21 test/javascripts/remove_selects_spec.js
workarea-admin-3.5.0.beta.1 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.20 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.19 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.18 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.17 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.16 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.15 test/javascripts/remove_selects_spec.js
workarea-admin-3.4.14 test/javascripts/remove_selects_spec.js