From 19a9d4471bc0ca9ac498d9886ad2df82985e196e Mon Sep 17 00:00:00 2001 From: Nikolai Ovtsinnikov Date: Thu, 28 Sep 2023 12:38:58 +0300 Subject: [PATCH] fix tests --- test/api/mailboxes-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/api/mailboxes-test.js b/test/api/mailboxes-test.js index 1972bd82..87da78c1 100644 --- a/test/api/mailboxes-test.js +++ b/test/api/mailboxes-test.js @@ -355,7 +355,7 @@ describe('Mailboxes tests', function () { const inboxMailbox = mailboxes.body.results.find(el => el.path === 'INBOX'); - const response = await server.put(`/users/${user}/mailboxes/${inboxMailbox.id}`).send({ path: 'newPath/folder123' }).expect(405); + const response = await server.put(`/users/${user}/mailboxes/${inboxMailbox.id}`).send({ path: 'newPath/folder123' }).expect(400); expect(response.body.error).to.be.equal('Mailbox update failed with code DisallowedMailboxMethod'); }); @@ -373,7 +373,7 @@ describe('Mailboxes tests', function () { it('should DELETE /users/{user}/mailboxes/{mailbox} expect failure / protected path', async () => { const mailboxes = await server.get(`/users/${user}/mailboxes`).expect(200); - const response = await server.del(`/users/${user}/mailboxes/${mailboxes.body.results[0].id}`).expect(405); + const response = await server.del(`/users/${user}/mailboxes/${mailboxes.body.results[0].id}`).expect(400); expect(response.body.error).to.be.equal('Mailbox deletion failed with code DisallowedMailboxMethod'); expect(response.body.code).to.be.equal('DisallowedMailboxMethod'); @@ -429,7 +429,7 @@ describe('Mailboxes tests', function () { const inboxMailbox = mailboxes.body.results.find(el => el.path === 'INBOX'); - const response = await server.del(`/users/${user}/mailboxes/${inboxMailbox.id}`).expect(405); + const response = await server.del(`/users/${user}/mailboxes/${inboxMailbox.id}`).expect(400); expect(response.body.error).to.be.equal('Mailbox deletion failed with code DisallowedMailboxMethod'); expect(response.body.code).to.be.equal('DisallowedMailboxMethod');