|
|
|
@ -9,8 +9,7 @@ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
describe('OCA.Sharing.FileList tests', function() { |
|
|
|
|
var testFiles, alertStub, notificationStub, fileList, fileActions; |
|
|
|
|
var oldFileListPrototype; |
|
|
|
|
var testFiles, alertStub, notificationStub, fileList; |
|
|
|
|
|
|
|
|
|
beforeEach(function() { |
|
|
|
|
alertStub = sinon.stub(OC.dialogs, 'alert'); |
|
|
|
@ -46,17 +45,11 @@ 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(); |
|
|
|
|
}); |
|
|
|
|
afterEach(function() { |
|
|
|
|
OCA.Files.FileList.prototype = oldFileListPrototype; |
|
|
|
|
testFiles = undefined; |
|
|
|
|
fileList.destroy(); |
|
|
|
|
fileList = undefined; |
|
|
|
|
fileActions = undefined; |
|
|
|
|
|
|
|
|
|
notificationStub.restore(); |
|
|
|
|
alertStub.restore(); |
|
|
|
@ -577,11 +570,7 @@ describe('OCA.Sharing.FileList tests', function() { |
|
|
|
|
'</div>'); |
|
|
|
|
$('#content').append($div); |
|
|
|
|
|
|
|
|
|
fileList = new OCA.Files.FileList( |
|
|
|
|
$div, { |
|
|
|
|
fileActions: fileActions |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
fileList = new OCA.Files.FileList($div); |
|
|
|
|
OCA.Sharing.Util.attach(fileList); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|