mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 14:29:31 +00:00
It is a common pattern to use JSON Schema to validate a API response[1], [2] and [3]. This patch creates the `assert_response_schema` test helper that helps people do this kind of validation easily on the controller tests. [1]: https://robots.thoughtbot.com/validating-json-schemas-with-an-rspec-matcher [2]: https://github.com/sharethrough/json-schema-rspec [3]: https://github.com/rails-api/active_model_serializers/issues/1011#issuecomment-127608121
8 lines
135 B
Ruby
8 lines
135 B
Ruby
module ActiveModelSerializers
|
|
module Test
|
|
extend ActiveSupport::Autoload
|
|
autoload :Serializer
|
|
autoload :Schema
|
|
end
|
|
end
|