From 32f7efe4437570ba4ab36ce1a1ccce54dee25010 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Sun, 10 Jun 2018 12:00:25 +1000 Subject: [PATCH] test: fix head rows spec for mysql --- spec/lib/pact_broker/matrix/head_row_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/lib/pact_broker/matrix/head_row_spec.rb b/spec/lib/pact_broker/matrix/head_row_spec.rb index b8f47ef9c..558030c8f 100644 --- a/spec/lib/pact_broker/matrix/head_row_spec.rb +++ b/spec/lib/pact_broker/matrix/head_row_spec.rb @@ -50,10 +50,9 @@ module Matrix .create_pact end - subject { HeadRow.eager(:consumer_version_tags).eager(:latest_verification_for_consumer_version_tag).order(:pact_publication_id).all } + subject { HeadRow.where(verification_id: nil, consumer_version_tag_name: "prod").eager(:consumer_version_tags).eager(:latest_verification_for_consumer_version_tag).order(:pact_publication_id).all } it "returns the most recent verification for the previous version with the same tag" do - expect(subject.last.verification_id).to be nil # this pact version has not been verified directly expect(subject.last.latest_verification_for_consumer_version_tag.provider_version.number).to eq "11" end end