07 - Postman Testing
Last updated
Last updated
In this module, we'll quickly test our routes with Postman. We want to run 8 tests between the user and authtest controllers:
Create a new user.
Get a new token.
Set up the headers with the proper token.
Create an item with a specific user.
Get all items for a specific user.
Get a single item for a specific user.
Update an item for a specific user.
Delete an item for a specific user.
After each step, check the relevant table in your database to make sure that everything worked properly. There are screenshots below to show you how each request should look, but try to do them by yourself first.
Test your Endpoints: 1. Create a new user.
Get a new token.
Set up the headers with the proper token. Just copy and paste the token you just got. And our application is returning json.
Create an item with a specific user authtest/create
.
Get all items for a specific user authtest/getall
. We added a few items.
Get a single item for a specific user authtest/id
.
Update an item for a specific user authtest/update/id
. If you have more than one item, the updated one will move to the bottom of the list.
Had to get the quote right obviously. 8. Delete an item for a specific user authtest/delete/id
.
It's like the Gungans never existed.