-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
While investigating the relevance of virtual values for relationships with the json_api adapter, I came across those tests, which expect an output that is not JSONAPI compliant:
- test_has_many_with_no_serializer
- expected output:
{:data=>{:id=>"1", :type=>"posts", :relationships=>{:tags=>{:data=>[{"attributes"=>{"id"=>1, "name"=>"#hash_tag"}}]}}}}
- expected output:
- test_has_many_with_virtual_value
- expected output:
{:data=>{:id=>"1", :type=>"virtual_values", :relationships=>{:maker=>{:data=>{:id=>1}}, :reviews=>{:data=>[{:id=>1}, {:id=>2}]}}}}
- expected output:
- test_has_one_with_virtual_value
- expected output:
{:data=>{:id=>"1", :type=>"virtual_values", :relationships=>{:maker=>{:data=>{:id=>1}}, :reviews=>{:data=>[{:id=>1}, {:id=>2}]}}}}
- expected output: