*/
describe('OCA.Files.FileActions tests', function() {
- var fileList, fileActions;
+ var fileList, fileActions, clock;
beforeEach(function() {
+ clock = sinon.useFakeTimers();
// init horrible parameters
var $body = $('#testArea');
$body.append('<input type="hidden" id="dir" value="/subdir"></input>');
fileActions = null;
fileList.destroy();
fileList = undefined;
+ clock.restore();
$('#dir, #permissions, #filestable').remove();
});
it('calling clear() clears file actions', function() {
describe('OCA.SystemTags.SystemTagsInfoView tests', function() {
var isAdminStub;
var view;
+ var clock;
beforeEach(function() {
+ clock = sinon.useFakeTimers();
view = new OCA.SystemTags.SystemTagsInfoView();
$('#testArea').append(view.$el);
isAdminStub = sinon.stub(OC, 'isUserAdmin').returns(true);
});
afterEach(function() {
isAdminStub.restore();
+ clock.restore();
view.remove();
view = undefined;
});
*/
describe('OC.SystemTags.SystemTagsInputField tests', function() {
- var view, select2Stub;
+ var view, select2Stub, clock;
beforeEach(function() {
+ clock = sinon.useFakeTimers();
var $container = $('<div class="testInputContainer"></div>');
select2Stub = sinon.stub($.fn, 'select2');
select2Stub.returnsThis();
afterEach(function() {
select2Stub.restore();
OC.SystemTags.collection.reset();
+ clock.restore();
view.remove();
view = undefined;
});