From e055fbd4dab59c31edbc704b937bfd1d785d3f73 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 2 Dec 2016 13:40:23 +0100 Subject: adjust js tests Signed-off-by: Robin Appelman --- core/js/tests/specs/coreSpec.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/js') 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(); -- cgit v1.2.3