fix(dav): return 405 when collection already exists

See https://datatracker.ietf.org/doc/html/rfc4918#section-9.3.1
This commit is contained in:
Francis Lachapelle committed 2022-08-09 12:17:55 -04:00
1 parent efe78c5179
commit 95eecc402a
8 files changed
+42 -21

No files matched your search

+7
View File
@@ -15,6 +15,13 @@ describe('read and set calendar properties', function() {
await webdav.deleteObject(resource)
})
it("calendar already exists", async function() {
const response = await webdav.makeCalendar(resource)
expect(response[0].status)
.withContext(`HTTP status code of MKCALENDAR`)
.toEqual(405)
})
// CalDAVPropertiesTest
it("propfind", async function() {
+7
View File
@@ -97,6 +97,13 @@ describe('CardDAV extensions', function() {
await webdav_su.deleteObject(resource)
})
it("addressbook already exists", async function() {
const response = await webdav.makeCollection(resource)
expect(response[0].status)
.withContext(`HTTP status code of MKCOL`)
.toEqual(405)
})
// CARDDAV:addressbook-query Report
// https://datatracker.ietf.org/doc/html/rfc6352#section-8.6
it("supports for addressbook-query on GCS folder", async function() {