Skip to content
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

checking form values in request #128

Open
sevko opened this issue Jul 17, 2017 · 0 comments
Open

checking form values in request #128

sevko opened this issue Jul 17, 2017 · 0 comments

Comments

@sevko
Copy link

sevko commented Jul 17, 2017

Does Jadler support checking for specific form values in requests? I couldn't find anything about it in the documentation. I have several functions that make HTTP requests based on their arguments, and want to make sure that they're sending the right values in the requests, so ideally I'd be able to write a test like:

onRequest()
    .havingPathEqualTo("/request/path")
    .havingFormValueEqualTo("field", "value")
    .receivedOnce()

In theory I could use .havingBodyEqualTo() on the entire stringified request, but in this case I'm testing multipart-form requests and the library I'm using to generate them (okhttp3) randomly generates form separators, so the string forms of two otherwise identical requests won't actually match.

Any pointers/advice? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant