-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat(testing): allow merging data in mocked fixture responses #425
base: v3
Are you sure you want to change the base?
Conversation
One small concern I have is that this code uses I wanted to stay consistent with implementations of |
@Sammyjo20 do you think you could take a look at that? this would really ease testing requests 🙏 |
7c5ef75
to
df757bb
Compare
You can amend my previous concern, I refactored the pull request to support dot-notation, which fixes the issue. I've been testing this in a work project, |
0635860
to
f0f95ca
Compare
Hey @innocenzi thank you for this PR, it looks like a great addition! The only thing I ask is instead of having it as a second argument could we have a method that chains onto the ::fixture() call? Like |
That's a nice idea—I updated the PR! |
@Sammyjo20 any chance you could take another look at this? |
Closes #416
This pull request allows merging data in fixtures:
This is useful when the mocked response is used by other part of the code that depends on it, and assertions are performed later on the result of that code.
One (very) simple example of that would be testing if a data transfer object can be created: