Match on 405
This commit is contained in:
parent
8aa0832bd4
commit
dea8e29289
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue