Sha256: 287720b135ff588884c69cc78847242e327a7a084d56ee17b90cb269f7cd4bcd

Contents?: true

Size: 879 Bytes

Versions: 62

Compression:

Stored size: 879 Bytes

Contents

//= require workarea/core/modules/deletion_forms

(function () {
    'use strict';

    describe('WORKAREA.deletionForms', function () {
        describe('init', function () {
            it('ignores forms with the data attribute to disable confirmation', function () {
                var $fixture = $(fixture.load('deletion_forms.html', true));

                // prevent the form from submitting when we trigger it later
                $fixture
                    .find('form')
                    .on('submit', function (e) { e.preventDefault(); });

                WORKAREA.deletionForms.init($fixture);
                sinon.spy(window, 'confirm');

                $('#form-without-confirmation').trigger('submit');
                expect(window.confirm.getCall(0)).to.equal(null);

                window.confirm.restore();
            });
        });
    });
}());

Version data entries

62 entries across 62 versions & 1 rubygems

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