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.15 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.36 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.14 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.35 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.13 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.34 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.12 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.33 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.11 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.10 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.32 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.9 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.31 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.8 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.30 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.7 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.29 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.6 test/javascripts/deletion_forms_spec.js
workarea-core-3.4.28 test/javascripts/deletion_forms_spec.js
workarea-core-3.5.5 test/javascripts/deletion_forms_spec.js