basically what I want to do is create a mock that only triggers if a specific query parameter is missing:
mock_server.mock(|when, then| {
when.method(GET).path("/api")
.query_param("param", "that-I-want")
.query_param_i_dont_want("bad-param",no")
;
then.status(200).json_body(json!({
"response": "So good that you didn't add the bad param!"
}));
so in this case, a call to /api?param=that-I-want will return a 200 with the message
a call to /api?param=that-I-want&bad-param=no will not return a 200
it was hard writing a good title,
basically what I want to do is create a mock that only triggers if a specific query parameter is missing:
so in this case, a call to /api?param=that-I-want will return a 200 with the message a call to /api?param=that-I-want&bad-param=no will not return a 200