Skip to content

Testing Delete Todo Endpoint

To be able to test our delete enpoint, we will have to obtain id of an existing item from our database. We can do it by going to MongoDB Atlas, entering to our "Cluster0" and go to "Collections" tab.

After that, you can select "todos" collection and all todo items will be listed on the right side if there is any.

In order to delete an item, we will use value of _id attribute.

MongoDB Atlas Object ID
MongoDB Atlas Object ID

You can see from the image above that we currently have just one item we added in the testing phase of adding a new todo item, so we will test deletion on that one.