diff options
Diffstat (limited to 'library/cropperjs/test/options/background.js')
-rw-r--r-- | library/cropperjs/test/options/background.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/library/cropperjs/test/options/background.js b/library/cropperjs/test/options/background.js new file mode 100644 index 000000000..21dbb8b12 --- /dev/null +++ b/library/cropperjs/test/options/background.js @@ -0,0 +1,40 @@ +QUnit.test('options#background: true', function (assert) { + var done = assert.async(); + var util = window.Util; + var image = util.createImage(); + + assert.expect(1); + + return new Cropper(image, { + // background: true, + + ready: function () { + var cropper = this.cropper; + + assert.ok(util.hasClass(cropper.cropper, 'cropper-bg')); + + done(); + } + }); +}); + +QUnit.test('options#background: false', function (assert) { + var done = assert.async(); + var util = window.Util; + var image = util.createImage(); + + assert.expect(1); + + return new Cropper(image, { + background: false, + + ready: function () { + var cropper = this.cropper; + + assert.notOk(util.hasClass(cropper.cropper, 'cropper-bg')); + + done(); + } + }); + +}); |