diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-07-01 11:10:37 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-07-01 11:10:37 +0200 |
commit | 4acb06923d633bba9151237b0f0a88dcf99da7e6 (patch) | |
tree | 87e9f4630e24c8efe62d1b6f9e5325c500270556 /apps/files/tests | |
parent | 2d2d2267f7f38ca29e7b87f40fae62261614b0d1 (diff) | |
download | nextcloud-server-4acb06923d633bba9151237b0f0a88dcf99da7e6.tar.gz nextcloud-server-4acb06923d633bba9151237b0f0a88dcf99da7e6.zip |
Filelist change dir auto-prepend slash
Prepend a slash to directories in case it was missing since many places
assume that it's there.
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index a74e1c7328c..fd87c9acdec 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1391,6 +1391,12 @@ describe('OCA.Files.FileList tests', function() { setDirSpy.restore(); getFolderContentsStub.restore(); }); + it('prepends a slash to directory if none was given', function() { + fileList.changeDirectory(''); + expect(fileList.getCurrentDirectory()).toEqual('/'); + fileList.changeDirectory('noslash'); + expect(fileList.getCurrentDirectory()).toEqual('/noslash'); + }); }); describe('breadcrumb events', function() { var deferredList; |