Skip to content

Non-compliant JSONAPI tests #1112

@beauby

Description

@beauby

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"}}]}}}}
  • 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}]}}}}
  • 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}]}}}}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions