Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NickOvt committed Sep 28, 2023
1 parent f206ac9 commit 19a9d44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/api/mailboxes-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
Expand All @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 19a9d44

Please sign in to comment.