diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-17 18:10:49 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-17 18:10:49 +0200 |
commit | 7db0d5512910e768912f615cb408677e38735d91 (patch) | |
tree | f422b8f8581cf45d150cdd529b79606477dc1185 /apps | |
parent | ef0a0f5f87f88ff19d6f2234f7669914881e8b1a (diff) | |
parent | 05cf940983bed37b9b29b496dbd3dea073fe21ee (diff) | |
download | nextcloud-server-7db0d5512910e768912f615cb408677e38735d91.tar.gz nextcloud-server-7db0d5512910e768912f615cb408677e38735d91.zip |
Merge pull request #11105 from owncloud/jsunit-legacyfileactionsfix
Tentative fix for legacy file actions unit test side effect
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/tests/js/appSpec.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/js/appSpec.js | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/apps/files/tests/js/appSpec.js b/apps/files/tests/js/appSpec.js index 77d36d59fa9..dce513339f0 100644 --- a/apps/files/tests/js/appSpec.js +++ b/apps/files/tests/js/appSpec.js @@ -23,6 +23,7 @@ describe('OCA.Files.App tests', function() { var App = OCA.Files.App; var pushStateStub; var parseUrlQueryStub; + var oldLegacyFileActions; beforeEach(function() { $('#testArea').append( @@ -41,6 +42,7 @@ describe('OCA.Files.App tests', function() { '</div>' ); + oldLegacyFileActions = window.FileActions; window.FileActions = new OCA.Files.FileActions(); OCA.Files.legacyFileActions = window.FileActions; OCA.Files.fileActions = new OCA.Files.FileActions(); @@ -54,6 +56,8 @@ describe('OCA.Files.App tests', function() { afterEach(function() { App.destroy(); + window.FileActions = oldLegacyFileActions; + pushStateStub.restore(); parseUrlQueryStub.restore(); }); diff --git a/apps/files_sharing/tests/js/appSpec.js b/apps/files_sharing/tests/js/appSpec.js index 3f9cc61da5d..49bca568001 100644 --- a/apps/files_sharing/tests/js/appSpec.js +++ b/apps/files_sharing/tests/js/appSpec.js @@ -57,6 +57,16 @@ describe('OCA.Sharing.App tests', function() { }); }); describe('file actions', function() { + var oldLegacyFileActions; + + beforeEach(function() { + oldLegacyFileActions = window.FileActions; + window.FileActions = new OCA.Files.FileActions(); + }); + + afterEach(function() { + window.FileActions = oldLegacyFileActions; + }); it('provides default file actions', function() { _.each([fileListIn, fileListOut], function(fileList) { var fileActions = fileList.fileActions; |