Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2020

Conversation

lukemelia
Copy link
Contributor

@lukemelia lukemelia commented Jul 24, 2020

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:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes /
    features)
  • All automated checks pass (CI/CD)

@stas stas merged commit 1a2a44a into jsonapi-rb:master Jul 24, 2020
@stas
Copy link
Collaborator

stas commented Jul 24, 2020

Thank you Luke! 🙇

@lukemelia lukemelia deleted the feature/relationships-exactly branch July 25, 2020 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants