Hi, there! Could someone help me please. I've some...
# pact-js
r
Hi, there! Could someone help me please. I've some error when pass nested hash with
search
key to query:
Copy code
const request_params = { page: '1' search: { wq: "NurseAction", specialty_nm: "Primary+Care"} }

 provider
      .given('generate message rooms')
      .uponReceiving('a request for message rooms')
      .withRequest({
        method: 'GET',
        path: '/v4/message_rooms',
        query: request_params,
        headers: {},
      })
Copy code
ERROR: pact@12.0.0: Test failed for the following reasons:
Mock server failed with the following mismatches:
0) The following request was incorrect: GET /v4/messaging/message_rooms
but it works when I remove
search
key from
request_params
. Is it possible to pass a nested hash to query?
m
hmm I’m not sure we support nested hashes. How do you send the query over the wire (i.e. how do you encode that query?)