diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-10-09 08:44:26 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-10-09 14:53:59 +0300 |
commit | 9af69ca2a5ed74acefdaedad6d189bdfd9e61e0e (patch) | |
tree | c755177c3886de1498010820b9a547a5314c8d41 /apps/files_sharing/tests/js/publicAppSpec.js | |
parent | 8b38b601e5bd07559bb86d38132be31820c41627 (diff) |
Fix usage of deprecated OC.webroot
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_sharing/tests/js/publicAppSpec.js')
-rw-r--r-- | apps/files_sharing/tests/js/publicAppSpec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js index 8ea339fd9de..dc9000af152 100644 --- a/apps/files_sharing/tests/js/publicAppSpec.js +++ b/apps/files_sharing/tests/js/publicAppSpec.js @@ -110,24 +110,24 @@ describe('OCA.Sharing.PublicApp tests', function() { it('returns correct download URL for single files', function() { expect(fileList.getDownloadUrl('some file.txt')) - .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2Fsubdir&files=some%20file.txt'); + .toEqual(OC.getRootPath() + '/index.php/s/sh4tok/download?path=%2Fsubdir&files=some%20file.txt'); expect(fileList.getDownloadUrl('some file.txt', '/anotherpath/abc')) - .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2Fanotherpath%2Fabc&files=some%20file.txt'); + .toEqual(OC.getRootPath() + '/index.php/s/sh4tok/download?path=%2Fanotherpath%2Fabc&files=some%20file.txt'); fileList.changeDirectory('/'); expect(fileList.getDownloadUrl('some file.txt')) - .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2F&files=some%20file.txt'); + .toEqual(OC.getRootPath() + '/index.php/s/sh4tok/download?path=%2F&files=some%20file.txt'); }); it('returns correct download URL for multiple files', function() { expect(fileList.getDownloadUrl(['a b c.txt', 'd e f.txt'])) - .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2Fsubdir&files=%5B%22a%20b%20c.txt%22%2C%22d%20e%20f.txt%22%5D'); + .toEqual(OC.getRootPath() + '/index.php/s/sh4tok/download?path=%2Fsubdir&files=%5B%22a%20b%20c.txt%22%2C%22d%20e%20f.txt%22%5D'); }); it('returns the correct ajax URL', function() { expect(fileList.getAjaxUrl('test', {a:1, b:'x y'})) - .toEqual(OC.webroot + '/index.php/apps/files_sharing/ajax/test.php?a=1&b=x%20y&t=sh4tok'); + .toEqual(OC.getRootPath() + '/index.php/apps/files_sharing/ajax/test.php?a=1&b=x%20y&t=sh4tok'); }); it('returns correct download URL for downloading everything', function() { expect(fileList.getDownloadUrl()) - .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2Fsubdir'); + .toEqual(OC.getRootPath() + '/index.php/s/sh4tok/download?path=%2Fsubdir'); }); }); describe('Upload Url', function() { |