-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add relations to environments endpoint for each environment
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
spec/service_consumers/provider_states_for_pact_broker_client_2.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Pact.provider_states_for "Pact Broker Client" do | ||
|
||
provider_state "the pb:pacticipant-version and pb:environments relations exist in the index resource" do | ||
no_op | ||
end | ||
|
||
provider_state "an environment with name test exists" do | ||
set_up do | ||
TestDataBuilder.new | ||
.create_environment("test") | ||
end | ||
end | ||
|
||
provider_state "version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment" do | ||
set_up do | ||
TestDataBuilder.new | ||
.create_consumer("Foo") | ||
.create_consumer_version("5556b8149bf8bac76bc30f50a8a2dd4c22c85f30") | ||
.create_environment("test", uuid: "cb632df3-0a0d-4227-aac3-60114dd36479") | ||
end | ||
end | ||
|
||
provider_state "version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo does not exist" do | ||
no_op | ||
end | ||
|
||
provider_state "version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with 2 environments that aren't test available for deployment" do | ||
set_up do | ||
TestDataBuilder.new | ||
.create_consumer("Foo") | ||
.create_consumer_version("5556b8149bf8bac76bc30f50a8a2dd4c22c85f30") | ||
.create_environment("prod") | ||
.create_environment("dev") | ||
end | ||
end | ||
end |