Skip to content

Commit

Permalink
Fixed a case where create method would be wrapped by a spy multiple t…
Browse files Browse the repository at this point in the history
…imes. Also removed commented code.
  • Loading branch information
mlewand committed Nov 23, 2017
1 parent d55f635 commit dee413d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/plugins/uploadimage/uploadimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@

this.responseData = {};
};

// sinon.spy( CKEDITOR.fileTools.fileLoader.prototype, 'upload' );
},

setUp: function() {
Expand Down Expand Up @@ -548,6 +546,7 @@

editor.once( 'afterPaste', function() {
resume( function() {
createspy.restore();
assert.isTrue( createspy.notCalled );
} );
} );
Expand All @@ -567,6 +566,7 @@

editor.once( 'afterPaste', function() {
resume( function() {
createSpy.restore();
assert.areSame( 3, createSpy.callCount, 'create call count' );

assert.isMatching( /image-\d+-\d+\.gif/, createSpy.args[ 0 ][ 1 ], 'file name passed to first call' );
Expand Down

0 comments on commit dee413d

Please sign in to comment.