Exercise

Now that we have our test written for the Shopping List to test out the CRUD operations inside our ShoppingListController, it's time for a short exercise. Similar to how we tested Shopping List API endpoints, write tests to verify the ItemController and its API endpoints. This includes testing Item creation and verifying that it is added to the Shopping List by clicking on the show action of the Shopping List it was added to.

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.