-
Notifications
You must be signed in to change notification settings - Fork 53
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
test: Add test for successful one-one create mutation #1215
test: Add test for successful one-one create mutation #1215
Conversation
Might as well migrate the 4 existing tests before going through the hassle of adding new ones in a different (new) framework.
Codecov Report
@@ Coverage Diff @@
## develop #1215 +/- ##
===========================================
+ Coverage 68.57% 68.65% +0.08%
===========================================
Files 181 181
Lines 17125 17125
===========================================
+ Hits 11743 11758 +15
+ Misses 4424 4413 -11
+ Partials 958 954 -4 |
Benchmark ResultsSummary
✅ See Better Results...
❌ See Worse Results...
✨ See Unchanged Results...
🐋 See Full Results... |
e9b2904
to
53791db
Compare
Benchmark ResultsSummary
✅ See Better Results...
❌ See Worse Results...
✨ See Unchanged Results...
🐋 See Full Results... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for catching!
// This test documents incorrect behaviour. It should be possible to create author then book, | ||
// linking in the second create step (like in [TestMutationCreateOneToOne]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Can you help me understand why this is incorrect behaviour? I feel like both this one and TestMutationCreateOneToOneNoChild
should fail for the same reason that their assigned relationship doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is with the error that is returned. author_id
is flagged as not existing whereas it should be seen as existing - the test should create the book (until TestMutationCreateOneToOneNoChild
is fixed to error correctly when trying to link to a doc that doesnt exist).
When/whilst the bug is fixed/being-fixed, this test should be amended/duplicated so that the author it is pointed to actually exists prior to book creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright I understand now thanks.
* Migrate one-one tests to new framework Might as well migrate the 4 existing tests before going through the hassle of adding new ones in a different (new) framework. * Document documentation test * Document documentation test * Add one-one create mutation test
…1215) * Migrate one-one tests to new framework Might as well migrate the 4 existing tests before going through the hassle of adding new ones in a different (new) framework. * Document documentation test * Document documentation test * Add one-one create mutation test
Relevant issue(s)
Resolves #1212
Description
Adds a test for a successful one-one create mutation. Only failures and partial creation (no linkage) were tested before, possibly due to limitations in the old test framework.
Also migrates the existing tests to the new framework, and links the documentation tests to new created github issues.
Gap was spotted whilst adding examples to the user guides.