Skip to content

Commit 18b9b7e

Browse files
committed
fix: delete pacticipant labels before deleting pacticipant
1 parent d59c7e5 commit 18b9b7e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/pact_broker/pacticipants/service.rb

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def self.delete name
8686
connection.run("delete from pact_versions where consumer_id = #{pacticipant.id}")
8787
connection.run("delete from versions where pacticipant_id = #{pacticipant.id}")
8888
version_repository.delete_by_id version_ids
89+
label_repository.delete_by_pacticipant_id(pacticipant.id)
8990
connection.run("delete from pacticipants where id = #{pacticipant.id}")
9091
end
9192

spec/lib/pact_broker/pacticipants/service_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ module Pacticipants
116116
before do
117117
TestDataBuilder.new
118118
.create_consumer("Consumer")
119+
.create_label("finance")
119120
.create_consumer_version("2.3.4")
120121
.create_provider("Provider")
121122
.create_pact

0 commit comments

Comments
 (0)