Replies: 1 comment 3 replies
-
May I ask why not being able to reproduce the API behaviour in Unit Test is just a discussion and not an issue ? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My use case is the following: I have Items that have Properties. There is a Many 2 Many relationship between them. I want to be able to create Items with Properties that are created on the fly. I mean if property exists it is fetched, if it does not it is created. I can do so using the following pattern:
With this setup, when I perform a POST request with the following payload on the API directly (using Swagger):
I get a 201 with the following body:
Which is the expected result (property are created on the fly). Now if I want to automatize this check using Unit Test, I'll do something like this:
And then I get a 201 where properties are totally ignored (seems like they are popped):
I wonder if I am doing something wrong in automatizing test or if it is potentially a bug.
Beta Was this translation helpful? Give feedback.
All reactions