Skip to content
Permalink
Browse files

Match on 405

  • Loading branch information...
LukasReschke committed Jul 1, 2016
1 parent 8aa0832 commit dea8e29289a1b99d5e889627c2e377887f4f2983
Showing with 6 additions and 1 deletion.
  1. +1 −1 apps/files/js/filelist.js
  2. +5 −0 apps/files/tests/js/filelistSpec.js
@@ -1469,7 +1469,7 @@
return false;
}

if (status === 404) {
if (status === 404 || status === 405) {
// go back home
this.changeDirectory('/');
return false;
@@ -1336,6 +1336,11 @@ describe('OCA.Files.FileList tests', function() {
deferredList.reject(404);
expect(fileList.getCurrentDirectory()).toEqual('/');
});
it('switches to root dir when current directory returns 405', function() {
fileList.changeDirectory('/unexist');
deferredList.reject(405);
expect(fileList.getCurrentDirectory()).toEqual('/');
});
it('switches to root dir when current directory is forbidden', function() {
fileList.changeDirectory('/unexist');
deferredList.reject(403);

0 comments on commit dea8e29

Please sign in to comment.
You can’t perform that action at this time.