diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-10-28 15:05:07 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2024-01-09 10:56:14 +0100 |
commit | 82b5a19a35b780bf18ebac46711166158a5a6cb2 (patch) | |
tree | bbc44ee4e65f4b7c2f480962f15a9aeb0ca9587f /apps/files_sharing/tests | |
parent | 7b6a650b6e09b07d4b85a4ae84eb64a6c32b217f (diff) | |
download | nextcloud-server-82b5a19a35b780bf18ebac46711166158a5a6cb2.tar.gz nextcloud-server-82b5a19a35b780bf18ebac46711166158a5a6cb2.zip |
fix: public dav and files_sharing testing fixes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/js/fileDropSpec.js | 3 | ||||
-rw-r--r-- | apps/files_sharing/tests/js/publicAppSpec.js | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/apps/files_sharing/tests/js/fileDropSpec.js b/apps/files_sharing/tests/js/fileDropSpec.js index efe87802d1c..18eee661e7f 100644 --- a/apps/files_sharing/tests/js/fileDropSpec.js +++ b/apps/files_sharing/tests/js/fileDropSpec.js @@ -91,8 +91,7 @@ describe("files Drop tests", function() { OCA.FilesSharingDrop.addFileToUpload('',data); expect(data.submit.calledOnce).toEqual(true); - expect(data.url).toContain("/public.php/webdav/" + encodeURI(testFile.name)); - expect(data.headers['Authorization']).toEqual('Basic ' + btoa(sharingToken+":")); + expect(data.url).toContain("/public.php/dav/files/" + sharingToken + '/' + encodeURI(testFile.name)); }); } }); diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js index 59ac4bd7bbd..229e57ac4ed 100644 --- a/apps/files_sharing/tests/js/publicAppSpec.js +++ b/apps/files_sharing/tests/js/publicAppSpec.js @@ -107,8 +107,7 @@ describe('OCA.Sharing.PublicApp tests', function() { App.initialize($('#preview')); expect(fakeServer.requests.length).toEqual(1); expect(fakeServer.requests[0].method).toEqual('PROPFIND'); - expect(fakeServer.requests[0].url).toEqual('https://example.com:9876/owncloud/public.php/webdav/subdir'); - expect(fakeServer.requests[0].requestHeaders.Authorization).toEqual('Basic c2g0dG9rOm51bGw='); + expect(fakeServer.requests[0].url).toEqual('https://example.com:9876/owncloud/public.php/dav/files/sh4tok/subdir'); uploaderDetectStub.restore(); }); @@ -149,11 +148,11 @@ describe('OCA.Sharing.PublicApp tests', function() { }); it('returns correct upload URL', function() { expect(fileList.getUploadUrl('some file.txt')) - .toEqual('/owncloud/public.php/webdav/subdir/some%20file.txt'); + .toEqual('/owncloud/public.php/dav/files/sh4tok/subdir/some%20file.txt'); }); it('returns correct upload URL with specified dir', function() { expect(fileList.getUploadUrl('some file.txt', 'sub')) - .toEqual('/owncloud/public.php/webdav/sub/some%20file.txt'); + .toEqual('/owncloud/public.php/dav/files/sh4tok/sub/some%20file.txt'); }); }); }); |