summaryrefslogtreecommitdiffstats
path: root/core/js/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-12-02 13:40:23 +0100
committerRobin Appelman <robin@icewind.nl>2016-12-02 13:40:23 +0100
commite055fbd4dab59c31edbc704b937bfd1d785d3f73 (patch)
tree851424803c1990e3109702414308ca57d8f6a42c /core/js/tests
parent8a3b6609694ae286da1ebc5025ec8dc728606931 (diff)
downloadnextcloud-server-e055fbd4dab59c31edbc704b937bfd1d785d3f73.tar.gz
nextcloud-server-e055fbd4dab59c31edbc704b937bfd1d785d3f73.zip
adjust js tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/js/tests')
-rw-r--r--core/js/tests/specs/coreSpec.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 5d42f0881d4..d1734a9f3d1 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -969,8 +969,11 @@ describe('Core base tests', function() {
var reloadStub, ajaxErrorStub, clock;
var notificationStub;
var waitTimeMs = 6000;
+ var oldCurrentUser;
beforeEach(function() {
+ oldCurrentUser = OC.currentUser;
+ OC.currentUser = 'dummy';
clock = sinon.useFakeTimers();
reloadStub = sinon.stub(OC, 'reload');
notificationStub = sinon.stub(OC.Notification, 'show');
@@ -980,6 +983,7 @@ describe('Core base tests', function() {
window.initCore();
});
afterEach(function() {
+ OC.currentUser = oldCurrentUser;
reloadStub.restore();
notificationStub.restore();
clock.restore();