diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-12-01 19:13:28 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-12-01 19:13:28 +0100 |
commit | 9704b4df5287b41dc80f83b032b406f664ae021c (patch) | |
tree | 095fd91a19a9e7244f677bf73445e18ffaa8f189 /apps/files/tests/js/filelistSpec.js | |
parent | 5cea7f35e124ea7a6b8352a1d05c00069e8814ae (diff) | |
download | nextcloud-server-9704b4df5287b41dc80f83b032b406f664ae021c.tar.gz nextcloud-server-9704b4df5287b41dc80f83b032b406f664ae021c.zip |
Catch status code 400
In case the server returns a statuscode 400 we should also gracefully return to the home directory.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/files/tests/js/filelistSpec.js')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index d8fc3907d78..c5a75be7c62 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1454,6 +1454,11 @@ describe('OCA.Files.FileList tests', function() { deferredList.reject(404); expect(fileList.getCurrentDirectory()).toEqual('/'); }); + it('switches to root dir when current directory returns 400', function() { + fileList.changeDirectory('/unexist'); + deferredList.reject(400); + expect(fileList.getCurrentDirectory()).toEqual('/'); + }); it('switches to root dir when current directory returns 405', function() { fileList.changeDirectory('/unexist'); deferredList.reject(405); |