Replies: 1 comment
-
Well.... there is the ugly solution to "re mock" inside the test. After the create request is done... IDK if that is the approach.... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, fellow developers.
I was wondering if you can help me with a specific use-case of Tesla.Mock.
(Not sure if this is the best place to post this question, if not, I can repost in the proper place, but here is:)
Context:
I want to create a record in an external API, for the same url, with the same query params, for this, I create a mock like this:
This "some_response_1.json", returns something like: Oh, you can create your record because there is nothing in here.
Then I do another request to create something, but now IN THE FUTURE, I want to do the exact same request as presented above, but this time reading another json response, A.K.A. "some_response_2.json":
How can I do this? if theoretically, I am pattern matching on the same Tesla props? But in different moments?
Thank you for your attention.
Best regards
Beta Was this translation helpful? Give feedback.
All reactions