| Start |
|---|
| Testing Serializer object and introducing it to Controller Let say you want to build your API to comply jsonapi.org specification and the result should look like: Test for Serializer object may look like this: Serializer object may look like this: When we run our "serializers" specs everything passes. That's pretty boring. Let's introduce a
typo to our Article Serializer: Instead of Once you've run the test it's pretty easy to spot the error. Once you fix the error (correct the type to be This example is based on article: http://www.eq8.eu/blogs/30-pure-rspec-json-api-testing (opens new window) |
Read Article
https://develop.horje.com/learn/1434/reference