Continuing from our last video, we will now see how we can write tests to cover our Video listing controller.

We have added a custom scope to only fetch the published videos. So, in our tests we will check whether we are getting list of videos or not, handling the pagination and then also check if the custom query scope is working or not.

Frontend: https://github.com/amitavroy/video-reviews
API: https://github.com/amitavdevzone/video-review-api
App link: https://video-reviews.vercel.app

You can find me on:
Twitter: https://twitter.com/amitavroy7​
Discord: https://discord.gg/Em4nuvQk

#laravel #api #scope #laravel testing

Testing our listing API and custom scope queries - Laravel testing tutorials 02
1.10 GEEK