jsonapi-rb / jsonapi-rspec

RSpec matchers for JSON:API spec
https://rubygems.org/gems/jsonapi-rspec
MIT License
123 stars 24 forks source link

Make #have_relationships accept symbols #15

Closed lancedikson closed 4 years ago

lancedikson commented 4 years ago

What is the current behavior?

I noticed that the have_relationships behavior mentioned in README.md doesn't work with a parsed JSON object if I pass symbols as described in the docs: expect(document['data']).to have_relationships(:posts, :comments)

What is the new behavior?

Now, have_relationships works both with symbols and strings.

Checklist

Please make sure the following requirements are complete:

lancedikson commented 4 years ago

For some reason, Github Actions weren't triggered, but the tests are passing on my laptop :) Would you mind running Actions manually?

stas commented 4 years ago

@lancedikson I'm reluctant to merging this. We should either update all the helpers to allow symbols or keep things the way these are now.

If you're willing to provide support for all the marchers, I'll be happy to merge it. Thanks for the PR :bowing_man:

stas commented 4 years ago

Superseded by #18