summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-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() {