aiillssa / Husky-Hustler-Backend

Backend for husky hustler. Here is the frontend: https://github.com/aiillssa/Husky-Hustlers-Frontend
1 stars 0 forks source link

Testing Bug: Incorrect status codes #12

Open aadityathukral opened 1 week ago

aadityathukral commented 1 week ago

Slightly Incorrect Status Codes

Currently, our test files do work, however the _getStatusCode() command returns the level of the response status code, but not the exact code itself.

For example, the createShop response returns a 200 on completion, however the createShop controller actually returns a 201.

aiillssa commented 1 week ago

We discussed how this is likely an issue with httpMocks. When testing our route on postman and browser, the status codes returned are correct (201). However, given that the most important digit is the first one, which indicates if the request was ok or not, we were thinking that httpMocks might've just rounded them down?