aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/js
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-05-02 16:03:58 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-05-06 17:55:30 +0200
commit249a5dbdba0dc3628c0f3490680de61dc91aafc8 (patch)
tree452f288909bb811146a0683b8a75c1b87932aadc /apps/files_sharing/tests/js
parente0c62352b71441c2f843fd5f023000af342011a8 (diff)
downloadnextcloud-server-249a5dbdba0dc3628c0f3490680de61dc91aafc8.tar.gz
nextcloud-server-249a5dbdba0dc3628c0f3490680de61dc91aafc8.zip
Move oc_webroot, OC.webroot and OC.getRootPath() to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_sharing/tests/js')
-rw-r--r--apps/files_sharing/tests/js/publicAppSpec.js9
1 files changed, 6 insertions, 3 deletions
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 = $('<div id="preview"></div>');
$('#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() {