Skip to content

Commit ebbbbec

Browse files
committed
feat(pacts for verification): make latest flag required and true for now, until the 'all pacts for tag' is implemented
1 parent 04a0f40 commit ebbbbec

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class VerifiablePactsJSONQuerySchema
1818
optional(:consumerVersionSelectors).each do
1919
schema do
2020
required(:tag).filled(:str?)
21-
optional(:latest).filled(included_in?: [true, false])
21+
required(:latest).filled(included_in?: [true])
2222
end
2323
end
2424
optional(:includePendingStatus).filled(included_in?: [true, false])

lib/pact_broker/api/contracts/verifiable_pacts_query_schema.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class VerifiablePactsQuerySchema
1717
optional(:consumer_version_selectors).each do
1818
schema do
1919
required(:tag).filled(:str?)
20-
optional(:latest).filled(included_in?: ["true", "false"])
20+
required(:latest).filled(included_in?: ["true"])
2121
end
2222
end
2323
optional(:include_pending_status).filled(included_in?: ["true", "false"])

spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_spec.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ module Contracts
5757
}]
5858
end
5959

60-
it "has no errors" do
61-
expect(subject).to eq({})
62-
end
60+
it { is_expected.to have_key(:consumerVersionSelectors) }
6361
end
6462

6563
context "when includeWipPactsSince key exists" do

spec/lib/pact_broker/api/contracts/verifiable_pacts_query_schema_spec.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ module Contracts
5151
}]
5252
end
5353

54-
it "has no errors" do
55-
expect(subject).to eq({})
56-
end
54+
it { is_expected.to have_key(:consumer_version_selectors) }
5755
end
5856

5957
context "when include_wip_pacts_since key exists" do

0 commit comments

Comments
 (0)