Module 14 Β· Testing the API β Lesson 3 of 5 Β· ~12 min
Model Tests
Testing DATA, not HTTP
A model test never touches a route, a controller, or an HTTP status code β it talks directly to an ActiveRecord class, the same way bin/rails console does. That makes model tests the fastest, most focused layer: no request/response cycle, just "given this object, is .valid? true or false, and what does .errors say?"