From 249a5dbdba0dc3628c0f3490680de61dc91aafc8 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 2 May 2019 16:03:58 +0200 Subject: Move oc_webroot, OC.webroot and OC.getRootPath() to the bundle Signed-off-by: Christoph Wurst --- apps/files_sharing/tests/js/publicAppSpec.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'apps') diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js index 9d24a7a7946..52230b3e2fa 100644 --- a/apps/files_sharing/tests/js/publicAppSpec.js +++ b/apps/files_sharing/tests/js/publicAppSpec.js @@ -21,13 +21,16 @@ describe('OCA.Sharing.PublicApp tests', function() { var App = OCA.Sharing.PublicApp; - var hostStub, protocolStub, webrootStub; + var hostStub, protocolStub; + var originalWebroot; var $preview; beforeEach(function() { + originalWebroot = OC.webroot; + OC.webroot = '/owncloud'; protocolStub = sinon.stub(OC, 'getProtocol').returns('https'); hostStub = sinon.stub(OC, 'getHost').returns('example.com:9876'); - webrootStub = sinon.stub(OC, 'getRootPath').returns('/owncloud'); + $preview = $('
'); $('#testArea').append($preview); $preview.append( @@ -38,9 +41,9 @@ describe('OCA.Sharing.PublicApp tests', function() { }); afterEach(function() { + OC.webroot = originalWebroot; protocolStub.restore(); hostStub.restore(); - webrootStub.restore(); }); describe('File list', function() { -- cgit v1.2.3