summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-08 20:08:01 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-08 20:08:01 +0100
commit2659661cb03e23930e9cd47fefd2b1e39fdcad78 (patch)
tree4b8424ab4168e9cbb636655f4c9252109c72d8f5
parent977e104cd423d63145e2d0e11ce4fc34c475becc (diff)
parent9b595474afc23676744b4ff82e4c370401bf3682 (diff)
downloadnextcloud-server-2659661cb03e23930e9cd47fefd2b1e39fdcad78.tar.gz
nextcloud-server-2659661cb03e23930e9cd47fefd2b1e39fdcad78.zip
Merge pull request #21546 from owncloud/jsunit-stubportinpublicappspec
Fix public page URL JS test
-rw-r--r--apps/files_sharing/tests/js/publicAppSpec.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js
index cedc51f98f1..17b7ffc9798 100644
--- a/apps/files_sharing/tests/js/publicAppSpec.js
+++ b/apps/files_sharing/tests/js/publicAppSpec.js
@@ -21,12 +21,13 @@
describe('OCA.Sharing.PublicApp tests', function() {
var App = OCA.Sharing.PublicApp;
- var hostStub, protocolStub, webrootStub;
+ var hostStub, portStub, protocolStub, webrootStub;
var $preview;
beforeEach(function() {
protocolStub = sinon.stub(OC, 'getProtocol').returns('https');
hostStub = sinon.stub(OC, 'getHost').returns('example.com');
+ portStub = sinon.stub(OC, 'getPort').returns(9876);
webrootStub = sinon.stub(OC, 'getRootPath').returns('/owncloud');
$preview = $('<div id="preview"></div>');
$('#testArea').append($preview);
@@ -40,6 +41,7 @@ describe('OCA.Sharing.PublicApp tests', function() {
afterEach(function() {
protocolStub.restore();
hostStub.restore();
+ portStub.restore();
webrootStub.restore();
});