mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 14:29:31 +00:00
490 B
490 B
How to test
Test helpers
ActiveModelSerializers provides a assert_serializer method to be used on your controller tests to
assert that a specific serializer was used.
class PostsControllerTest < ActionController::TestCase
test "should render post serializer" do
get :index
assert_serializer "PostSerializer"
end
end
See ActiveModelSerializers::Test::Serializer for more examples and documentation.