NestJS · Senior · Question 68 of 75

Why should controller tests not be the only tests for authorization rules?

Explanation

Write a few e2e tests per protected resource: no token, wrong user, right user.

Further reading

Problem with a question

NestJS · Senior · question 68

Test yourself

Take the NestJS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz