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
2022-08-09 11:57:47 -04:00
parent efe78c5179
commit 95eecc402a
8 changed files with 42 additions and 21 deletions

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() {

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() {