mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fixed a documentation error regarding adapter key constant, added tests
for SerializableResource::use_adapter?
This commit is contained in:
@@ -23,5 +23,13 @@ module ActiveModel
|
||||
options = nil
|
||||
assert_equal @adapter.as_json(options), @serializable_resource.as_json(options)
|
||||
end
|
||||
|
||||
def test_use_adapter_with_adapter_option
|
||||
assert ActiveModel::SerializableResource.new(@resource, { adapter: 'json' }).use_adapter?
|
||||
end
|
||||
|
||||
def test_use_adapter_with_adapter_option_as_false
|
||||
refute ActiveModel::SerializableResource.new(@resource, { adapter: false }).use_adapter?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user