diff options
author | Clark Tomlinson <fallen013@gmail.com> | 2015-06-19 10:31:22 -0400 |
---|---|---|
committer | Clark Tomlinson <fallen013@gmail.com> | 2015-06-22 11:42:42 -0400 |
commit | 5466dcadc005e352db70956441aaee01cda7c780 (patch) | |
tree | 0a7ca1a2e69d90ba348729de5af2d6d6a590acd7 /apps/files/tests | |
parent | 5ed9743570173fbea59f150c2fe8da8d6c681cba (diff) | |
download | nextcloud-server-5466dcadc005e352db70956441aaee01cda7c780.tar.gz nextcloud-server-5466dcadc005e352db70956441aaee01cda7c780.zip |
adding correct blocking logic for fff
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index aa44c92792d..6bcef8b6f4f 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1279,6 +1279,17 @@ describe('OCA.Files.FileList tests', function() { fakeServer.respond(); expect(fileList.getCurrentDirectory()).toEqual('/'); }); + it('switches to root dir when current directory is forbidden', function() { + fakeServer.respondWith(/\/index\.php\/apps\/files\/ajax\/list.php\?dir=%2funexist/, [ + 403, { + "Content-Type": "application/json" + }, + '' + ]); + fileList.changeDirectory('/unexist'); + fakeServer.respond(); + expect(fileList.getCurrentDirectory()).toEqual('/'); + }); it('shows mask before loading file list then hides it at the end', function() { var showMaskStub = sinon.stub(fileList, 'showMask'); var hideMaskStub = sinon.stub(fileList, 'hideMask'); |