Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-22 19:19:08 +0300
committerVincent Petry <pvince81@owncloud.com>2016-02-22 19:25:32 +0300
commit27544144cec06324a5fe4494034e893b7c5a66ff (patch)
tree36c437db587a801f0533e70e22ca5b4f8d3ec4f2 /apps/systemtags/tests
parent8ea80e114ae508586947db614b37db6b35972a9c (diff)
Fix unit tests affected by side effects
The notification tests were not restoring the clock properly, but indirectly helped other tests pass. Since now we're restoring the clock properly, the other tests were fixed to still work.
Diffstat (limited to 'apps/systemtags/tests')
-rw-r--r--apps/systemtags/tests/js/systemtagsinfoviewSpec.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js b/apps/systemtags/tests/js/systemtagsinfoviewSpec.js
index 0fb4e7b22c2..27724822c2e 100644
--- a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js
+++ b/apps/systemtags/tests/js/systemtagsinfoviewSpec.js
@@ -22,14 +22,17 @@
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;
});