aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/test/options/minContainerWidth.js
blob: 2119cc96eb92228bd2169efe0ffd0381fae3757f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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();
    }
  });
});