From bd06647b313846e0f45a3427364a9e2c25ecc8cc Mon Sep 17 00:00:00 2001 From: Attila Domokos Date: Thu, 30 Apr 2015 22:17:19 -0500 Subject: [PATCH] Adding a test to cover 'meta' and 'meta_key' attr_readers --- test/array_serializer_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/array_serializer_test.rb b/test/array_serializer_test.rb index 4fc774090..eb5b7f8e9 100644 --- a/test/array_serializer_test.rb +++ b/test/array_serializer_test.rb @@ -24,6 +24,14 @@ def test_each_object_should_be_serialized_with_appropriate_serializer assert_equal serializers.last.custom_options[:some], :options 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