diff options
Diffstat (limited to 'apps/files/tests/js/filesSpec.js')
-rw-r--r-- | apps/files/tests/js/filesSpec.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/tests/js/filesSpec.js b/apps/files/tests/js/filesSpec.js index 5c3f68b2ba4..bd4bae65102 100644 --- a/apps/files/tests/js/filesSpec.js +++ b/apps/files/tests/js/filesSpec.js @@ -78,15 +78,15 @@ describe('OCA.Files.Files tests', function() { describe('getDownloadUrl', function() { it('returns the ajax download URL when filename and dir specified', function() { var url = Files.getDownloadUrl('test file.txt', '/subdir'); - expect(url).toEqual(OC.webroot + '/remote.php/webdav/subdir/test%20file.txt'); + expect(url).toEqual(OC.getRootPath() + '/remote.php/webdav/subdir/test%20file.txt'); }); it('returns the webdav download URL when filename and root dir specified', function() { var url = Files.getDownloadUrl('test file.txt', '/'); - expect(url).toEqual(OC.webroot + '/remote.php/webdav/test%20file.txt'); + expect(url).toEqual(OC.getRootPath() + '/remote.php/webdav/test%20file.txt'); }); it('returns the ajax download URL when multiple files specified', function() { var url = Files.getDownloadUrl(['test file.txt', 'abc.txt'], '/subdir'); - expect(url).toEqual(OC.webroot + '/index.php/apps/files/ajax/download.php?dir=%2Fsubdir&files=%5B%22test%20file.txt%22%2C%22abc.txt%22%5D'); + expect(url).toEqual(OC.getRootPath() + '/index.php/apps/files/ajax/download.php?dir=%2Fsubdir&files=%5B%22test%20file.txt%22%2C%22abc.txt%22%5D'); }); }); describe('handleDownload', function() { |