From bf887eca8bac04cbbd2f1bd5197017c0e0583edd Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 4 Dec 2014 18:39:20 +0100 Subject: [PATCH] Remove obsoleted filelist prototype backup in tests --- .../files_external/tests/js/mountsfilelistSpec.js | 6 +----- apps/files_sharing/tests/js/shareSpec.js | 6 ------ apps/files_sharing/tests/js/sharedfilelistSpec.js | 15 ++------------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/apps/files_external/tests/js/mountsfilelistSpec.js b/apps/files_external/tests/js/mountsfilelistSpec.js index b599df77aac..50603081b6a 100644 --- a/apps/files_external/tests/js/mountsfilelistSpec.js +++ b/apps/files_external/tests/js/mountsfilelistSpec.js @@ -9,8 +9,7 @@ */ describe('OCA.External.FileList tests', function() { - var testFiles, alertStub, notificationStub, fileList, fileActions; - var oldFileListPrototype; + var testFiles, alertStub, notificationStub, fileList; beforeEach(function() { alertStub = sinon.stub(OC.dialogs, 'alert'); @@ -49,14 +48,11 @@ describe('OCA.External.FileList tests', function() { '
Empty content message
' + '' ); - fileActions = new OCA.Files.FileActions(); }); afterEach(function() { - OCA.Files.FileList.prototype = oldFileListPrototype; testFiles = undefined; fileList.destroy(); fileList = undefined; - fileActions = undefined; notificationStub.restore(); alertStub.restore(); diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js index d64d4ea8137..33c9c83b970 100644 --- a/apps/files_sharing/tests/js/shareSpec.js +++ b/apps/files_sharing/tests/js/shareSpec.js @@ -9,7 +9,6 @@ */ describe('OCA.Sharing.Util tests', function() { - var oldFileListPrototype; var fileList; var testFiles; @@ -24,10 +23,6 @@ describe('OCA.Sharing.Util tests', function() { } beforeEach(function() { - // back up prototype, as it will be extended by - // the sharing code - oldFileListPrototype = _.extend({}, OCA.Files.FileList.prototype); - var $content = $('
'); $('#testArea').append($content); // dummy file list @@ -67,7 +62,6 @@ describe('OCA.Sharing.Util tests', function() { }; }); afterEach(function() { - OCA.Files.FileList.prototype = oldFileListPrototype; delete OCA.Sharing.sharesLoaded; delete OC.Share.droppedDown; fileList.destroy(); diff --git a/apps/files_sharing/tests/js/sharedfilelistSpec.js b/apps/files_sharing/tests/js/sharedfilelistSpec.js index d85c0ab6dca..7fdc6345e38 100644 --- a/apps/files_sharing/tests/js/sharedfilelistSpec.js +++ b/apps/files_sharing/tests/js/sharedfilelistSpec.js @@ -9,8 +9,7 @@ */ describe('OCA.Sharing.FileList tests', function() { - var testFiles, alertStub, notificationStub, fileList, fileActions; - var oldFileListPrototype; + var testFiles, alertStub, notificationStub, fileList; beforeEach(function() { alertStub = sinon.stub(OC.dialogs, 'alert'); @@ -46,17 +45,11 @@ describe('OCA.Sharing.FileList tests', function() { '
Empty content message
' + '' ); - // back up prototype, as it will be extended by - // the sharing code - oldFileListPrototype = _.extend({}, OCA.Files.FileList.prototype); - fileActions = new OCA.Files.FileActions(); }); afterEach(function() { - OCA.Files.FileList.prototype = oldFileListPrototype; testFiles = undefined; fileList.destroy(); fileList = undefined; - fileActions = undefined; notificationStub.restore(); alertStub.restore(); @@ -577,11 +570,7 @@ describe('OCA.Sharing.FileList tests', function() { ''); $('#content').append($div); - fileList = new OCA.Files.FileList( - $div, { - fileActions: fileActions - } - ); + fileList = new OCA.Files.FileList($div); OCA.Sharing.Util.attach(fileList); }); -- 2.39.5