From 9b595474afc23676744b4ff82e4c370401bf3682 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 8 Jan 2016 13:25:38 +0100 Subject: [PATCH] Fix public page URL JS test Stub the port so it doesn't use the one configured by karma --- apps/files_sharing/tests/js/publicAppSpec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js index cedc51f98f..17b7ffc979 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 = $('
'); $('#testArea').append($preview); @@ -40,6 +41,7 @@ describe('OCA.Sharing.PublicApp tests', function() { afterEach(function() { protocolStub.restore(); hostStub.restore(); + portStub.restore(); webrootStub.restore(); });