undo and redo adding new cropper library as it had a .git config from the original project
This commit is contained in:
22
library/cropperjs/test/methods/destroy.js
Normal file
22
library/cropperjs/test/methods/destroy.js
Normal file
@@ -0,0 +1,22 @@
|
||||
QUnit.test('methods#destroy', function (assert) {
|
||||
var done = assert.async();
|
||||
var util = window.Util;
|
||||
var image = util.createImage();
|
||||
|
||||
assert.expect(4);
|
||||
|
||||
return new Cropper(image, {
|
||||
ready: function () {
|
||||
var cropper = this.cropper;
|
||||
|
||||
assert.ok(typeof cropper === 'object');
|
||||
assert.ok(util.hasClass(image, 'cropper-hidden'));
|
||||
|
||||
cropper.destroy();
|
||||
assert.ok(typeof this.cropper === 'undefined');
|
||||
assert.notOk(util.hasClass(image, 'cropper-hidden'));
|
||||
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user