aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/test/options/minCropBoxHeight.js
diff options
context:
space:
mode:
Diffstat (limited to 'library/cropperjs/test/options/minCropBoxHeight.js')
-rw-r--r--library/cropperjs/test/options/minCropBoxHeight.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/cropperjs/test/options/minCropBoxHeight.js b/library/cropperjs/test/options/minCropBoxHeight.js
new file mode 100644
index 000000000..ccf50aefe
--- /dev/null
+++ b/library/cropperjs/test/options/minCropBoxHeight.js
@@ -0,0 +1,23 @@
+QUnit.test('options#minCropBoxHeight', function (assert) {
+ var done = assert.async();
+ var util = window.Util;
+ var image = util.createImage();
+ var minCropBoxHeight = 150;
+
+ assert.expect(1);
+
+ return new Cropper(image, {
+ minCropBoxHeight: minCropBoxHeight,
+
+ ready: function () {
+ var cropper = this.cropper;
+ var cropBoxData = cropper.setCropBoxData({
+ height: 100
+ }).getCropBoxData();
+
+ assert.strictEqual(Math.round(cropBoxData.height), minCropBoxHeight);
+
+ done();
+ }
+ });
+});