diff options
Diffstat (limited to 'library/cropperjs/test/options/minContainerWidth.js')
-rw-r--r-- | library/cropperjs/test/options/minContainerWidth.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/library/cropperjs/test/options/minContainerWidth.js b/library/cropperjs/test/options/minContainerWidth.js new file mode 100644 index 000000000..2119cc96e --- /dev/null +++ b/library/cropperjs/test/options/minContainerWidth.js @@ -0,0 +1,21 @@ +QUnit.test('options#minContainerWidth', function (assert) { + var done = assert.async(); + var util = window.Util; + var image = util.createImage(); + var minContainerWidth = 641; + + assert.expect(1); + + return new Cropper(image, { + minContainerWidth: minContainerWidth, + + ready: function () { + var cropper = this.cropper; + var containerData = cropper.getContainerData(); + + assert.strictEqual(Math.round(containerData.width), minContainerWidth); + + done(); + } + }); +}); |