lib/pact_broker/api/resources/pact.rb in pact_broker-1.10.0 vs lib/pact_broker/api/resources/pact.rb in pact_broker-1.11.0
- old
+ new
@@ -38,10 +38,13 @@
def known_methods
super + ['PATCH']
end
def is_conflict?
- potential_duplicate_pacticipants?(pact_params.pacticipant_names)
+ merge_conflict = request.patch? && resource_exists? &&
+ Pacts::Merger.conflict?(pact.json_content, pact_params.json_content)
+
+ potential_duplicate_pacticipants?(pact_params.pacticipant_names) || merge_conflict
end
def malformed_request?
if request.patch? || request.put?
invalid_json? ||