You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the noob question, but I can't seem to get plain text request body to match the result. Changing to json works fine, so I'm not sure what I'm doing wrong. :(
service {
given('scenario for adding random plain text')
uponReceiving('random text')
withAttributes(
method: 'post',
path: '/random',
headers: headers,
body: regexp(~/\w+/,"randomText"))
willRespondWith(status: 200)
}
PactVerificationResult result = service.runTest { mockServer ->
def client = new RESTClient(mockServer.url)
def auth_response = client.post(
path: '/random',
headers : headers,
body: "randomText")
assert auth_response.status == 200
}
assert result == PactVerificationResult.Ok.INSTANCE
The text was updated successfully, but these errors were encountered:
Sorry for the noob question, but I can't seem to get plain text request body to match the result. Changing to json works fine, so I'm not sure what I'm doing wrong. :(
The text was updated successfully, but these errors were encountered: