summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-09-16 15:30:56 +0200
committerVincent Petry <pvince81@owncloud.com>2014-09-16 15:38:44 +0200
commit05cf940983bed37b9b29b496dbd3dea073fe21ee (patch)
treee743de4b64c24007bf7293a95f5a433d0c58264d /apps/files/tests
parent1978d3d6a279a4c60371b2cf809bd57e70f4ed35 (diff)
downloadnextcloud-server-05cf940983bed37b9b29b496dbd3dea073fe21ee.tar.gz
nextcloud-server-05cf940983bed37b9b29b496dbd3dea073fe21ee.zip
Tentative fix for legacy file actions unit test side effect
Sometimes the JS unit test with legacy file actions fail. This fix runs the legacy file actions tests on a dummy instead of the real one.
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/appSpec.js4
1 files changed, 4 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();
});