diff options
Diffstat (limited to 'library/cropperjs/test/methods/moveTo.js')
-rw-r--r-- | library/cropperjs/test/methods/moveTo.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/library/cropperjs/test/methods/moveTo.js b/library/cropperjs/test/methods/moveTo.js new file mode 100644 index 000000000..e8bf0eebd --- /dev/null +++ b/library/cropperjs/test/methods/moveTo.js @@ -0,0 +1,19 @@ +QUnit.test('methods#moveTo', function (assert) { + var done = assert.async(); + var util = window.Util; + var image = util.createImage(); + + assert.expect(2); + + return new Cropper(image, { + ready: function () { + var cropper = this.cropper; + var canvasData = cropper.moveTo(0, 0).getCanvasData(); + + assert.strictEqual(canvasData.left, 0); + assert.strictEqual(canvasData.top, 0); + + done(); + } + }); +}); |