We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instead of test element by element value. You can be able to compare the complete object: Suppose you have next JSON
{"data":` "restaurant": { "id": 1, "name": "Number 1", ... } }
An an object restaurant typre Restaurant, so istead of doing:
expect_json('data.restaurant', id: restaurant.id ) expect_json('data.restaurant', name: restaurant.name ) ...
You have the possibility to do:
expect_json('data', restaurant: restaurant )
The text was updated successfully, but these errors were encountered:
This is not something that we plan to support right now. You can always just convert your object to a hash.
Sorry, something went wrong.
Also you don't need a separate test for each property:
expect_json('data.restaurant', id: restaurant.id, name: restaurant.name )
No branches or pull requests
Instead of test element by element value. You can be able to compare the complete object:
Suppose you have next JSON
An an object restaurant typre Restaurant, so istead of doing:
You have the possibility to do:
The text was updated successfully, but these errors were encountered: