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