]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove obsoleted filelist prototype backup in tests
authorVincent Petry <pvince81@owncloud.com>
Thu, 4 Dec 2014 17:39:20 +0000 (18:39 +0100)
committerVincent Petry <pvince81@owncloud.com>
Thu, 4 Dec 2014 17:39:20 +0000 (18:39 +0100)
apps/files_external/tests/js/mountsfilelistSpec.js
apps/files_sharing/tests/js/shareSpec.js
apps/files_sharing/tests/js/sharedfilelistSpec.js

index b599df77aacf0f4ddaaf03f83a1ae691c89827f3..50603081b6a71fb9884cf74b0c2474a6c7e692e7 100644 (file)
@@ -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() {
                        '<div id="emptycontent">Empty content message</div>' +
                        '</div>'
                );
-               fileActions = new OCA.Files.FileActions();
        });
        afterEach(function() {
-               OCA.Files.FileList.prototype = oldFileListPrototype;
                testFiles = undefined;
                fileList.destroy();
                fileList = undefined;
-               fileActions = undefined;
 
                notificationStub.restore();
                alertStub.restore();
index d64d4ea8137d7bdee64e0d1cb413adebea1af74b..33c9c83b97013d4a2cc7402a00f23402ff9bc38d 100644 (file)
@@ -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 = $('<div id="content"></div>');
                $('#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();
index d85c0ab6dcac2f2e042e7eba8be9ba3fe5275eff..7fdc6345e381a535ce72ede8b722638f640acf2f 100644 (file)
@@ -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() {
                        '<div id="emptycontent">Empty content message</div>' +
                        '</div>'
                );
-               // 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() {
                                '</div>');
                        $('#content').append($div);
 
-                       fileList = new OCA.Files.FileList(
-                               $div, {
-                                       fileActions: fileActions
-                               }
-                       );
+                       fileList = new OCA.Files.FileList($div);
                        OCA.Sharing.Util.attach(fileList);
                });