Skip to content

Inconsistentcy, have_jsonapi_attributes should not allow symbols #17

Closed
@nattfodd

Description

@nattfodd

FastJsonapi serializer returns keys as symbols with MySerializer.new(data).serializable_hash, including :attributes. It's pretty unobvious that you can say expect(data).to have_jsonapi_attributes(:foo, :bar) but your data object should be { 'attributes' => { foo: 1, bar: 2 } } with "attribute" key being precisely a string.

return false unless actual.key?('attributes')

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