diff --git a/services/Promoter/src/test/java/com/bottega/promoter/concert/fixtures/PricingPactFixtures.java b/services/Promoter/src/test/java/com/bottega/promoter/concert/fixtures/PricingPactFixtures.java index 3fe01385..19016eb9 100644 --- a/services/Promoter/src/test/java/com/bottega/promoter/concert/fixtures/PricingPactFixtures.java +++ b/services/Promoter/src/test/java/com/bottega/promoter/concert/fixtures/PricingPactFixtures.java @@ -15,9 +15,29 @@ public RequestResponsePact applyPercentageDiscount(PactDslWithProvider builder) .given("price for item exists", "itemId", "123") .uponReceiving("a discount request") .path("/api/v1/item/123/price-factor/percentage") - //TODO specify HTTP method, headers and request body + .method("POST") + .headers(Map.of("Content-Type", "application/json")) + .body(""" + { + "percentage": 10 + } + """) .willRespondWith() - //TODO specify response status, headers and body + .status(200) + .headers(Map.of("Content-Type", "application/json")) + .body(""" + [ + { + "price": 9000, + "factors": [ + { + "type": "PERCENTAGE", + "value": 10 + } + ] + } + ] + """) .toPact(); }