mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
Adding a test to cover 'meta' and 'meta_key' attr_readers
This commit is contained in:
parent
2fac65ae0e
commit
bd06647b31
@ -24,6 +24,14 @@ module ActiveModel
|
|||||||
|
|
||||||
assert_equal serializers.last.custom_options[:some], :options
|
assert_equal serializers.last.custom_options[:some], :options
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_meta_and_meta_key_attr_readers
|
||||||
|
meta_content = {meta: "the meta", meta_key: "the meta key"}
|
||||||
|
@serializer = ArraySerializer.new([@comment, @post], meta_content)
|
||||||
|
|
||||||
|
assert_equal @serializer.meta, "the meta"
|
||||||
|
assert_equal @serializer.meta_key, "the meta key"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user