Testing secured endpoints
We're now ready to test our user API endpoints. The first thing we should do is create a new test file for testing these. So let's go:
$ touch tests/unit/server/user.test.js
Let's then copy all the required modules from the top of the items test file as we'll need most of these in the users test file, too.
We'll make a few alternations, though; let's require the
User model rather than the
Click to load comments...