Skip to content

Instantly share code, notes, and snippets.

{
"description": "A request for products",
"request": {
"method": "GET",
"path": "/catalog/products",
"headers": {
"Accept": "application/json"
},
"query": {
"gender": [
@ian-ellis
ian-ellis / Pact Builder
Created March 23, 2017 01:59
Pact Builder
pactBuilder {
serviceConsumer 'Android_App'
hasPactWith 'Eve_v1'
port PORT
uponReceiving 'A request for products'
withAttributes(
method: 'GET',
path: "/catalog/products",
headers: ['Accept': 'application/json'],
@ian-ellis
ian-ellis / Pact Fail
Created March 23, 2017 01:59
Pact Fail
$.body.page_count -> Expected 1 but received 462
$.body._embedded.product.0.name -> Expected 'Alaska Coat' but received '1460 8 Eye Boots Smooth'
$.body._embedded.product.0.sku -> Expected 'FR760AA31JSE' but received 'DR086SH49AVE'
$.body._embedded.product.0.price -> Expected 169.95 but received 199
$.body._embedded.product.0.short_description -> Expected 'A product description' but received '<b>PLEASE NOTE - THE ICONIC IS UNABLE TO SHIP THIS PRODUCT TO NEW ZEALAND.</b><br><br>For the original grunge look, you can't go past <b>Dr Martens 1460Z DMC 8 Eye Lace Up</b> boots, a direct replica of the first boots to roll off the production
line in 1960. Combine your pair with distressed skinny jeans and a printed tee.<br><br>- Genuine leather upper and lining<br>- Rounded toe<br>- Eight-eye lace-up fastening<br>- Classic looped pull tab<br>- Topstitch detailing around the sole<br>- Oil and acid resistant outsole<br><br>PLEASE NOTE : This style comes in UK sizing and has a unisex fit. We reco