jsonapi-rb / jsonapi-rspec

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

Add support for `.exactly` to the `have_relationships(...)` matcher #23

Closed lukemelia closed 4 years ago

lukemelia commented 4 years ago

What is the current behavior?

Currently, the library supports have_attributes(attr1, attr2, etc).exactly to verify that the specified attributes are the complete set of attributes in the node. However have_relationships(rel1, rel2).exactly is not supported.

What is the new behavior?

have_relationships(rel1, rel2).exactly is supported and will fail if any other relationships are present besides the specified ones.

Checklist

Please make sure the following requirements are complete:

stas commented 4 years ago

Thank you Luke! :bow: