From d8fc0fb2e093686e4ae2863088746e8b190c467e Mon Sep 17 00:00:00 2001 From: Swayam Rana Date: Wed, 9 Aug 2023 17:39:51 +0000 Subject: [PATCH] fix: contract matching and response --- .../frontend-app-profile-edx-platform.json | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/src/pacts/frontend-app-profile-edx-platform.json b/src/pacts/frontend-app-profile-edx-platform.json index cd6e9d1..05f6192 100644 --- a/src/pacts/frontend-app-profile-edx-platform.json +++ b/src/pacts/frontend-app-profile-edx-platform.json @@ -15,6 +15,7 @@ "path": "/api/user/v1/accounts/staff" }, "response": { + "status": 200, "body": { "bio": "This is my bio", "country": "ME", @@ -31,18 +32,37 @@ "Content-Type": "application/json" }, "matchingRules": { - "body": { - "$": { - "combine": "AND", - "matchers": [ - { - "match": "type" - } - ] - } + "$.body.bio": { + "match": "type" + }, + "$.body.country": { + "match": "type" + }, + "$.body.gender": { + "match": "type" + }, + "$.body.goals": { + "match": "type" + }, + "$.body.isActive": { + "match": "type" + }, + "$.body.mailingAddress": { + "match": "type" + }, + "$.body.name": { + "match": "type" + }, + "$.body.phoneNumber": { + "match": "type" + }, + "$.body.username": { + "match": "type" + }, + "$.body.yearOfBirth": { + "match": "type" } - }, - "status": 200 + } } } ],