Skip to content

MockWs route not applied if user passing query parameters directly in the url #257

@gaeljw

Description

@gaeljw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions