Skip to content

Commit

Permalink
test: add provider states for pact broker client
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Feb 14, 2021
1 parent 08c0ad0 commit f31bfde
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/service_consumers/hal_relation_proxy_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class HalRelationProxyApp
'/HAL-REL-PLACEHOLDER-INDEX-PB-LATEST-VERSION-Condor' =>
'/pacticipants/Condor/latest-version',
'/HAL-REL-PLACEHOLDER-PB-WEBHOOKS' =>
'/webhooks'
'/webhooks',
'/HAL-REL-PLACEHOLDER-INDEX-PB-PACTICIPANT-VERSION-Foo-26f353580936ad3b9baddb17b00e84f33c69e7cb' =>
'/pacticipants/Foo/versions/26f353580936ad3b9baddb17b00e84f33c69e7cb'
}

RESPONSE_BODY_REPLACEMENTS = {
Expand Down
16 changes: 16 additions & 0 deletions spec/service_consumers/provider_states_for_pact_broker_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,20 @@
.create_consumer("Foo")
end
end

provider_state "the pb:pacticipant-version relation exists in the index resource" do
no_op
end

provider_state "version 26f353580936ad3b9baddb17b00e84f33c69e7cb of pacticipant Foo does not exist" do
no_op
end

provider_state "version 26f353580936ad3b9baddb17b00e84f33c69e7cb of pacticipant Foo does exist" do
set_up do
TestDataBuilder.new
.create_consumer("Foo")
.create_consumer_version("26f353580936ad3b9baddb17b00e84f33c69e7cb")
end
end
end

0 comments on commit f31bfde

Please sign in to comment.