Skip to content

Commit

Permalink
feat(pacts for verification): make latest flag required and true for …
Browse files Browse the repository at this point in the history
…now, until the 'all pacts for tag' is implemented
  • Loading branch information
bethesque committed Nov 21, 2019
1 parent 04a0f40 commit ebbbbec
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class VerifiablePactsJSONQuerySchema
optional(:consumerVersionSelectors).each do
schema do
required(:tag).filled(:str?)
optional(:latest).filled(included_in?: [true, false])
required(:latest).filled(included_in?: [true])
end
end
optional(:includePendingStatus).filled(included_in?: [true, false])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class VerifiablePactsQuerySchema
optional(:consumer_version_selectors).each do
schema do
required(:tag).filled(:str?)
optional(:latest).filled(included_in?: ["true", "false"])
required(:latest).filled(included_in?: ["true"])
end
end
optional(:include_pending_status).filled(included_in?: ["true", "false"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ module Contracts
}]
end

it "has no errors" do
expect(subject).to eq({})
end
it { is_expected.to have_key(:consumerVersionSelectors) }
end

context "when includeWipPactsSince key exists" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ module Contracts
}]
end

it "has no errors" do
expect(subject).to eq({})
end
it { is_expected.to have_key(:consumer_version_selectors) }
end

context "when include_wip_pacts_since key exists" do
Expand Down

0 comments on commit ebbbbec

Please sign in to comment.