summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-22 17:19:08 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-22 17:25:32 +0100
commit27544144cec06324a5fe4494034e893b7c5a66ff (patch)
tree36c437db587a801f0533e70e22ca5b4f8d3ec4f2 /core
parent8ea80e114ae508586947db614b37db6b35972a9c (diff)
downloadnextcloud-server-27544144cec06324a5fe4494034e893b7c5a66ff.tar.gz
nextcloud-server-27544144cec06324a5fe4494034e893b7c5a66ff.zip
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 'core')
-rw-r--r--core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js b/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
index d62ef672f4d..aadf0de53f2 100644
--- a/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
+++ b/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
@@ -20,9 +20,10 @@
*/
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();
@@ -31,6 +32,7 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
afterEach(function() {
select2Stub.restore();
OC.SystemTags.collection.reset();
+ clock.restore();
view.remove();
view = undefined;
});