mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
updating tests to work with new virtual_value implementation
This commit is contained in:
parent
d3649d5b4e
commit
741c4a4b51
@ -115,7 +115,7 @@ module ActiveModel
|
|||||||
id: "1",
|
id: "1",
|
||||||
type: "posts",
|
type: "posts",
|
||||||
relationships: {
|
relationships: {
|
||||||
tags: {:data=>nil}
|
tags: { data: nil }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, adapter.serializable_hash)
|
}, adapter.serializable_hash)
|
||||||
|
|||||||
@ -71,7 +71,7 @@ module ActiveModel
|
|||||||
PostWithTagsSerializer.new(@post).each_association do |name, serializer, options|
|
PostWithTagsSerializer.new(@post).each_association do |name, serializer, options|
|
||||||
assert_equal name, :tags
|
assert_equal name, :tags
|
||||||
assert_equal serializer, nil
|
assert_equal serializer, nil
|
||||||
assert_equal options, {:virtual_value=>[{"attributes"=>{"name"=>"#hashtagged"}}]}
|
assert_equal [{ attributes: { name: "#hashtagged" }}].as_json, options[:virtual_value]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user