Expected 'Forbidden' to deeply equal 'Method Not Allowed'

Hi guys, doing some tests for my assignment and getting this error:
expected ‘Forbidden’ to deeply equal ‘Method Not allowed’.

So, basically, the test wants the error to be 405 and in the current state error 403 is raised. I assume this is not the right place to ask questions about the code, but concerning this message: what exactly does it mean in my case?

I saw similar topics but the content was a bit different. This ‘deeply equal’ is what gets me puzzled.

Here is the request itself, I am getting back the message that I do not have the rights to execute this action (which lines well with my permissions as indeed the user is not supposed to have the rights to create tags).

The “deeply equals” is being produced by the “to.be.eql” assertion which is part of the Chai assertion library.

Expect / Should - Chai (chaijs.com)

The best way to check for statuses is to use “pm.response.to.have.status” which is a special assertion linked to the pm.response function.

pm.test("Status code is 200", () => {
  pm.response.to.have.status(200);
});

Thank you for the info!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.