MΓ³dulo 14 Β· Testing the API β LecciΓ³n 4 de 5 Β· ~12 min
Integration Tests: Test the API like a Client
A different layer, a different question
Model tests ask "is this data valid?" Integration tests ask a bigger question: "if a real client sent this exact HTTP request, what comes back?" They live in test/integration/, extend ActionDispatch::IntegrationTest, and drive the app through actual routes β the same post/get/patch your curl commands have been hitting since module 08, just called from Ruby instead of a terminal.