mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Serializer should be available wiithing adapter to inspect attributes and assotions
This commit is contained in:
@@ -5,8 +5,8 @@ module ActiveModel
|
||||
class AdapterTest < Minitest::Test
|
||||
def setup
|
||||
profile = Profile.new
|
||||
serializer = ProfileSerializer.new(profile)
|
||||
@adapter = ActiveModel::Serializer::Adapter.new(serializer)
|
||||
@serializer = ProfileSerializer.new(profile)
|
||||
@adapter = ActiveModel::Serializer::Adapter.new(@serializer)
|
||||
end
|
||||
|
||||
def test_serializable_hash_is_abstract_method
|
||||
@@ -20,6 +20,10 @@ module ActiveModel
|
||||
@adapter.to_json(only: [:name])
|
||||
end
|
||||
end
|
||||
|
||||
def test_serializer
|
||||
assert_equal @serializer, @adapter.serializer
|
||||
end
|
||||
end
|
||||
|
||||
class AdapterForTest < Minitest::Test
|
||||
|
||||
Reference in New Issue
Block a user