Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Test that http client requests have expected path, headers, body #176

Open
diehuxx opened this issue Feb 20, 2024 · 1 comment · Fixed by #177
Open

Test that http client requests have expected path, headers, body #176

diehuxx opened this issue Feb 20, 2024 · 1 comment · Fixed by #177

Comments

@diehuxx
Copy link

diehuxx commented Feb 20, 2024

Currently, we only test that the method -- e.g. TbdexHttpClient.sendMessage or TbdexHttpClient.getOfferings -- does not throw an error when it is called. We should also be testing that the server received a request at the correct path and with the correct headers and body

okhttp has an API to test this with mockWebServer.takeRequest(). See documentation here

@jiyoonie9
Copy link
Contributor

@diehuxx would you say this issue can be closed, or do we need a bit more tests? i see #177 is referenced here, but not sure if that PR included checking all client requests having expected path/headers/body.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants