diff --git a/lib/pact_broker/pacts/pact_publication_dataset_module.rb b/lib/pact_broker/pacts/pact_publication_dataset_module.rb index f8ad0f1a6..e8af24aad 100644 --- a/lib/pact_broker/pacts/pact_publication_dataset_module.rb +++ b/lib/pact_broker/pacts/pact_publication_dataset_module.rb @@ -133,12 +133,7 @@ def for_branch_heads(branch_name) end def latest_for_consumer_branch(branch_name) - # Keep this flag for a little whle in case we need to disable the new logic - if PactBroker.feature_enabled?(:disable_use_branch_heads_for_latest_branch_pacts, true) - old_latest_for_consumer_branch(branch_name) - else - for_branch_heads(branch_name) - end + for_branch_heads(branch_name) end def old_latest_for_consumer_branch(branch_name) diff --git a/spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb b/spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb index cb5653872..476e4b4de 100644 --- a/spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb +++ b/spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb @@ -113,17 +113,6 @@ module Pacts all = subject.all_allowing_lazy_load expect(all.size).to eq 1 end - - context "when the new logic is disabled" do - before do - allow(PactBroker). to receive(:feature_enabled?).with(:disable_use_branch_heads_for_latest_branch_pacts, true).and_return(true) - end - - it "does return a pact for the branch" do - all = subject.all_allowing_lazy_load - expect(all.size).to eq 2 - end - end end context "when columns are already selected" do