mountebank : no predicate match for a contains block

247 views Asked by At

Hello i am completely new to mountebank

I am trying write a stub with predicate for the following json blob

{
  "query": {
    "response_type": "code",
    "state": "{\"action\":\"none\",\"newOrg\":true,\"testParams\":{\"orgId\":\"222\",\"trailId\":\"222\",\"isTrail\":true}}"
  },
}

In the above, the orgId will be unique on each request. I need to write a stub with predicate that matches request query which contains orgId as 222

  predicates: [
    {
      contains: {
        query: {
          state: '"orgId":"111"'
        }
      }
    }
  ]

i have written a predicate like above which is giving me no predicate match. The mb docs examples are pretty old and not able find an example for this. can someone help me with this?

0

There are 0 answers