Extract attributes filtering from serializer into adapter.

This commit is contained in:
Lucas Hosseini
2015-10-05 06:08:11 +02:00
parent 066990184b
commit 658810e6a0
8 changed files with 35 additions and 59 deletions

View File

@@ -18,11 +18,6 @@ module ActiveModel
@profile_serializer.class._attributes)
end
def test_attributes_with_fields_option
assert_equal({ name: 'Name 1' },
@profile_serializer.attributes(fields: [:name]))
end
def test_attributes_inheritance_definition
assert_equal([:id, :body], @serializer_klass._attributes)
end