Skip to content

Commit

Permalink
fix: delete pacticipant labels before deleting pacticipant
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Mar 9, 2018
1 parent d59c7e5 commit 18b9b7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/pact_broker/pacticipants/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def self.delete name
connection.run("delete from pact_versions where consumer_id = #{pacticipant.id}")
connection.run("delete from versions where pacticipant_id = #{pacticipant.id}")
version_repository.delete_by_id version_ids
label_repository.delete_by_pacticipant_id(pacticipant.id)
connection.run("delete from pacticipants where id = #{pacticipant.id}")
end

Expand Down
1 change: 1 addition & 0 deletions spec/lib/pact_broker/pacticipants/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ module Pacticipants
before do
TestDataBuilder.new
.create_consumer("Consumer")
.create_label("finance")
.create_consumer_version("2.3.4")
.create_provider("Provider")
.create_pact
Expand Down

0 comments on commit 18b9b7e

Please sign in to comment.