diff options
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/tests/js/versionmodelSpec.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_versions/tests/js/versionmodelSpec.js b/apps/files_versions/tests/js/versionmodelSpec.js index d47e92e2b60..ae8801b1f5c 100644 --- a/apps/files_versions/tests/js/versionmodelSpec.js +++ b/apps/files_versions/tests/js/versionmodelSpec.js @@ -86,9 +86,17 @@ describe('OCA.Versions.VersionModel', function() { }); expect(fakeServer.requests.length).toEqual(1); - fakeServer.requests[0].respond(404); + var responseErrorHeaders = { + "Content-Type": "application/xml" + }; + var responseErrorBody = + '<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">' + + ' <s:exception>Sabre\\DAV\\Exception\\SomeException</s:exception>' + + ' <s:message>Some error message</s:message>' + + '</d:error>'; + fakeServer.requests[0].respond(404, responseErrorHeaders, responseErrorBody); - promise.then(function() { + promise.fail(function() { expect(revertEventStub.notCalled).toEqual(true); expect(successStub.notCalled).toEqual(true); expect(errorStub.calledOnce).toEqual(true); |