Skip to content
Snippets Groups Projects
Commit 2659661c authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #21546 from owncloud/jsunit-stubportinpublicappspec

Fix public page URL JS test
parents 977e104c 9b595474
No related branches found
No related tags found
No related merge requests found
...@@ -21,12 +21,13 @@ ...@@ -21,12 +21,13 @@
describe('OCA.Sharing.PublicApp tests', function() { describe('OCA.Sharing.PublicApp tests', function() {
var App = OCA.Sharing.PublicApp; var App = OCA.Sharing.PublicApp;
var hostStub, protocolStub, webrootStub; var hostStub, portStub, protocolStub, webrootStub;
var $preview; var $preview;
beforeEach(function() { beforeEach(function() {
protocolStub = sinon.stub(OC, 'getProtocol').returns('https'); protocolStub = sinon.stub(OC, 'getProtocol').returns('https');
hostStub = sinon.stub(OC, 'getHost').returns('example.com'); hostStub = sinon.stub(OC, 'getHost').returns('example.com');
portStub = sinon.stub(OC, 'getPort').returns(9876);
webrootStub = sinon.stub(OC, 'getRootPath').returns('/owncloud'); webrootStub = sinon.stub(OC, 'getRootPath').returns('/owncloud');
$preview = $('<div id="preview"></div>'); $preview = $('<div id="preview"></div>');
$('#testArea').append($preview); $('#testArea').append($preview);
...@@ -40,6 +41,7 @@ describe('OCA.Sharing.PublicApp tests', function() { ...@@ -40,6 +41,7 @@ describe('OCA.Sharing.PublicApp tests', function() {
afterEach(function() { afterEach(function() {
protocolStub.restore(); protocolStub.restore();
hostStub.restore(); hostStub.restore();
portStub.restore();
webrootStub.restore(); webrootStub.restore();
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment