When the production code uses code similar to the following:
wsClient
.url(".../something?someQueryParam=some value")
.get()
And a test defines MockWS like this:
MockWS {
case ("GET", ".../something") => Action { ... }
}
Then the mocked route is not called.
It seems the mock only works is user do not define query parameters in the url(..)
.
While most of the time query parameters are passed via .addQueryStringParameters(..)
, it's still a valid usage of Play WS and would be nice if supported by MockWS.