Closed h4ck3rk3y closed 4 years ago
It does reach it, can you please explain more?
Oh sorry I was a bit confused because of the name TestCreateArticleUnauthorized
. I was expecting a POST
request to the /v1/article
endpoint with an invalid token. This is a Get request though. TestGetArticleUnauthorized
might be a better name?
You are absolutely correct! At first it was for "Creation" but then changed to "Get" because doesn't make sense to validate it post with body request... GET is less code.
Changed it here https://github.com/Massad/gin-boilerplate/commit/38835a58592b37980589806e56faaa720cde63ed
https://github.com/Massad/gin-boilerplate/blob/19bc7539f80228bbbffbe5d95ccc97b94dc71ed4/tests/article_test.go#L377-L398