summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/js/publicAppSpec.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-03 11:29:36 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-03 11:29:36 +0100
commit4bb96a55536d51a0e8bde498f88be3eaea6a906b (patch)
treedb62bc5aacb3a54e54678f92f8501d456dfe200b /apps/files_sharing/tests/js/publicAppSpec.js
parentaef43816c2a874c55896a6ba45edcee39eb899b9 (diff)
downloadnextcloud-server-4bb96a55536d51a0e8bde498f88be3eaea6a906b.tar.gz
nextcloud-server-4bb96a55536d51a0e8bde498f88be3eaea6a906b.zip
Construct valid URL
Diffstat (limited to 'apps/files_sharing/tests/js/publicAppSpec.js')
-rw-r--r--apps/files_sharing/tests/js/publicAppSpec.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js
index 17b7ffc9798..8561836d77c 100644
--- a/apps/files_sharing/tests/js/publicAppSpec.js
+++ b/apps/files_sharing/tests/js/publicAppSpec.js
@@ -21,13 +21,12 @@
describe('OCA.Sharing.PublicApp tests', function() {
var App = OCA.Sharing.PublicApp;
- var hostStub, portStub, protocolStub, webrootStub;
+ var hostStub, 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);
+ hostStub = sinon.stub(OC, 'getHost').returns('example.com:9876');
webrootStub = sinon.stub(OC, 'getRootPath').returns('/owncloud');
$preview = $('<div id="preview"></div>');
$('#testArea').append($preview);
@@ -41,7 +40,6 @@ describe('OCA.Sharing.PublicApp tests', function() {
afterEach(function() {
protocolStub.restore();
hostStub.restore();
- portStub.restore();
webrootStub.restore();
});
@@ -91,7 +89,7 @@ describe('OCA.Sharing.PublicApp tests', function() {
it('Uses public webdav endpoint', function() {
expect(fakeServer.requests.length).toEqual(1);
expect(fakeServer.requests[0].method).toEqual('PROPFIND');
- expect(fakeServer.requests[0].url).toEqual('https://example.com/owncloud/public.php/webdav/subdir');
+ expect(fakeServer.requests[0].url).toEqual('https://example.com:9876/owncloud/public.php/webdav/subdir');
expect(fakeServer.requests[0].requestHeaders.Authorization).toEqual('Basic c2g0dG9rOm51bGw=');
});