diff options
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/js/appSpec.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/js/sharedfilelistSpec.js | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/js/appSpec.js b/apps/files_sharing/tests/js/appSpec.js index ad95ee53942..6a30f18ea40 100644 --- a/apps/files_sharing/tests/js/appSpec.js +++ b/apps/files_sharing/tests/js/appSpec.js @@ -122,9 +122,7 @@ describe('OCA.Sharing.App tests', function() { type: 'dir', path: '/somewhere/inside/subdir', counterParts: ['user2'], - shares: [{ - ownerDisplayName: 'user2' - }] + shareOwner: 'user2' }]); fileListIn.findFileEl('testdir').find('td a.name').click(); diff --git a/apps/files_sharing/tests/js/sharedfilelistSpec.js b/apps/files_sharing/tests/js/sharedfilelistSpec.js index 7aec8322a44..f53e79e277f 100644 --- a/apps/files_sharing/tests/js/sharedfilelistSpec.js +++ b/apps/files_sharing/tests/js/sharedfilelistSpec.js @@ -9,7 +9,8 @@ */ describe('OCA.Sharing.FileList tests', function() { - var testFiles, alertStub, notificationStub, fileList; + var testFiles, alertStub, notificationStub, fileList, fileActions; + var oldFileListPrototype; beforeEach(function() { alertStub = sinon.stub(OC.dialogs, 'alert'); @@ -45,10 +46,17 @@ 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(); + OCA.Sharing.Util.initialize(fileActions); }); afterEach(function() { + OCA.Files.FileList.prototype = oldFileListPrototype; testFiles = undefined; fileList = undefined; + fileActions = undefined; notificationStub.restore(); alertStub.restore(); |