aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/appSpec.js4
-rw-r--r--apps/files/tests/js/fileactionsSpec.js6
2 files changed, 4 insertions, 6 deletions
diff --git a/apps/files/tests/js/appSpec.js b/apps/files/tests/js/appSpec.js
index 99a73d0b01d..77d36d59fa9 100644
--- a/apps/files/tests/js/appSpec.js
+++ b/apps/files/tests/js/appSpec.js
@@ -52,9 +52,7 @@ describe('OCA.Files.App tests', function() {
App.initialize();
});
afterEach(function() {
- App.navigation = null;
- App.fileList = null;
- App.files = null;
+ App.destroy();
pushStateStub.restore();
parseUrlQueryStub.restore();
diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js
index f087239de9d..f5f18a45a75 100644
--- a/apps/files/tests/js/fileactionsSpec.js
+++ b/apps/files/tests/js/fileactionsSpec.js
@@ -354,7 +354,7 @@ describe('OCA.Files.FileActions tests', function() {
it('notifies update event handlers once after multiple changes', function() {
var actionStub = sinon.stub();
var handler = sinon.stub();
- FileActions.addUpdateListener(handler);
+ FileActions.on('registerAction', handler);
FileActions.register(
'all',
'Test',
@@ -374,8 +374,8 @@ describe('OCA.Files.FileActions tests', function() {
it('does not notifies update event handlers after unregistering', function() {
var actionStub = sinon.stub();
var handler = sinon.stub();
- FileActions.addUpdateListener(handler);
- FileActions.removeUpdateListener(handler);
+ FileActions.on('registerAction', handler);
+ FileActions.off('registerAction', handler);
FileActions.register(
'all',
'Test',