diff --git a/doc/pacts/markdown/Pact Broker Client - Pactflow.md b/doc/pacts/markdown/Pact Broker Client - Pactflow.md index 7133e5e..491a95e 100644 --- a/doc/pacts/markdown/Pact Broker Client - Pactflow.md +++ b/doc/pacts/markdown/Pact Broker Client - Pactflow.md @@ -114,7 +114,7 @@ PactFlow will respond with: "body": { "_links": { "pf:ui": { - "href": "http://localhost:1235/contracts/bi-directional/provider/Bar/version/1/provider-contract" + "href": "some-url" } } } diff --git a/spec/pacts/pact_broker_client-pactflow.json b/spec/pacts/pact_broker_client-pactflow.json index 78a694b..bffebb2 100644 --- a/spec/pacts/pact_broker_client-pactflow.json +++ b/spec/pacts/pact_broker_client-pactflow.json @@ -68,9 +68,14 @@ "body": { "_links": { "pf:ui": { - "href": "http://localhost:1235/contracts/bi-directional/provider/Bar/version/1/provider-contract" + "href": "some-url" } } + }, + "matchingRules": { + "$.body._links.pf:ui.href": { + "match": "type" + } } } }, diff --git a/spec/service_providers/pactflow_publish_provider_contract_spec.rb b/spec/service_providers/pactflow_publish_provider_contract_spec.rb index 69add63..b15d875 100644 --- a/spec/service_providers/pactflow_publish_provider_contract_spec.rb +++ b/spec/service_providers/pactflow_publish_provider_contract_spec.rb @@ -98,7 +98,7 @@ headers: pact_broker_response_headers, body: { "_links": { "pf:ui": { - "href": "#{pactflow.mock_service_base_url}/contracts/bi-directional/provider/Bar/version/1/provider-contract" + "href": Pact.like("some-url") } } } } @@ -121,7 +121,7 @@ expect(subject.success).to be true expect(subject.message).to include "Successfully published provider contract for Bar version 1" expect(subject.message).to include "Next steps:" - expect(subject.message).to include success_response_with_pf_ui_url[:body][:_links][:'pf:ui'][:href] + expect(subject.message).to include "some-url" end end end \ No newline at end of file