summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/tests/js/filelistSpec.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-20 16:01:34 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-30 10:06:29 +0200
commitef59c69dc822c9ff69c564c41e0dfdce142b9cdf (patch)
treea99667ab22daba65cbbd77ac591fccac234f06eb /apps/files_trashbin/tests/js/filelistSpec.js
parentfa32243d84e1801c379a5e8956ba2f3de236c718 (diff)
downloadnextcloud-server-ef59c69dc822c9ff69c564c41e0dfdce142b9cdf.tar.gz
nextcloud-server-ef59c69dc822c9ff69c564c41e0dfdce142b9cdf.zip
Distinguish legacy file actions from regular file actions
Legacy file actions are registered by legacy apps through window.FileActions.register(). These actions can only be used by the main file list ("all files") because legacy apps can only deal with a single list / container. New file actions of compatible apps must be registered through OCA.Files.fileActions. These will be used for other lists like the sharing overview. Fixed versions and sharing actions to use OCA.Files.fileActions, which makes them available in the sharing overview list.
Diffstat (limited to 'apps/files_trashbin/tests/js/filelistSpec.js')
-rw-r--r--apps/files_trashbin/tests/js/filelistSpec.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_trashbin/tests/js/filelistSpec.js b/apps/files_trashbin/tests/js/filelistSpec.js
index d41c24c3cc9..11eeff68df8 100644
--- a/apps/files_trashbin/tests/js/filelistSpec.js
+++ b/apps/files_trashbin/tests/js/filelistSpec.js
@@ -21,7 +21,6 @@
describe('OCA.Trashbin.FileList tests', function() {
var testFiles, alertStub, notificationStub, fileList;
- var FileActions = OCA.Files.FileActions;
beforeEach(function() {
alertStub = sinon.stub(OC.dialogs, 'alert');
@@ -87,14 +86,18 @@ describe('OCA.Trashbin.FileList tests', function() {
etag: '456'
}];
- fileList = new OCA.Trashbin.FileList($('#app-content-trashbin'));
- OCA.Trashbin.App.registerFileActions(fileList);
+ // register file actions like the trashbin App does
+ var fileActions = OCA.Trashbin.App._createFileActions(fileList);
+ fileList = new OCA.Trashbin.FileList(
+ $('#app-content-trashbin'), {
+ fileActions: fileActions
+ }
+ );
});
afterEach(function() {
testFiles = undefined;
fileList = undefined;
- FileActions.clear();
$('#dir').remove();
notificationStub.restore();
alertStub.restore();