We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
On one of my projects there are a lot of tests using always a testAPI with the same set of headers such as:
var defaultHeaders http.Header testAPI.Post("/my/route", json.RawMessage(`{}`), defaultsHeaders). CmpStatus(http.StatusCreated). CmpJSONBody(...) < Same last 3 lines over and over >
I wonder if it'd be possible to directly set this kind of default values inside the testAPI itself, such as:
testAPI := tdhttp.NewTestAPI(t, testRouter).DefaultRequestParams(<INSERT DEFAULT HEADERS HERE>) testAPI.Post("/my/route", json.RawMessage(`{}`)). CmpStatus(http.StatusCreated). CmpJSONBody(...) < Same last 3 lines over and over >
The text was updated successfully, but these errors were encountered:
feat(tdhttp): add TestAPI's DefaultRequestParams & AddDefaultRequestP…
5d20bdc
…arams Closes #257. Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
09516fa
Good idea, please take a look at #258 to see whether it matches your needs... or not...
Sorry, something went wrong.
6aec0d8
Successfully merging a pull request may close this issue.
Hi,
On one of my projects there are a lot of tests using always a testAPI with the same set of headers such as:
I wonder if it'd be possible to directly set this kind of default values inside the testAPI itself, such as:
The text was updated successfully, but these errors were encountered: