Skip to content

Commit

Permalink
Merge pull request #895 from adomokos/adding-meta-test
Browse files Browse the repository at this point in the history
Adding a test to cover 'meta' and 'meta_key' attr_readers
  • Loading branch information
joaomdmoura committed May 1, 2015
2 parents 2fac65a + bd06647 commit 6a06b90
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/array_serializer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6a06b90

Please sign in to comment.