Sha256: ccd1a48e1416314dcf67edab6426359e1180387ec340590e49e207f757619166
Contents?: true
Size: 1.87 KB
Versions: 85
Compression:
Stored size: 1.87 KB
Contents
module PactBroker::Client describe Pacticipants, :pact => true do include_context "pact broker" let(:repository_url ) { "git@git.realestate.com.au:business-systems/pricing-service" } describe "registering a repository url" do context "where the pacticipant does not already exist in the pact-broker" do before do pact_broker. given("the 'Pricing Service' does not exist in the pact-broker"). upon_receiving("a request to register the repository URL of a pacticipant"). with( method: :patch, path: '/pacticipants/Pricing%20Service', headers: patch_request_headers, body: {repository_url: repository_url} ). will_respond_with( status: 201, headers: pact_broker_response_headers ) end it "returns true" do expect(pact_broker_client.pacticipants.update({:pacticipant => 'Pricing Service', :repository_url => repository_url})).to be true end end context "where the 'Pricing Service' exists in the pact-broker" do before do pact_broker. given("the 'Pricing Service' already exists in the pact-broker"). upon_receiving("a request to register the repository URL of a pacticipant"). with( method: :patch, path: '/pacticipants/Pricing%20Service', headers: patch_request_headers, body: { repository_url: repository_url }). will_respond_with( status: 200, headers: pact_broker_response_headers ) end it "returns true" do expect(pact_broker_client.pacticipants.update({:pacticipant => 'Pricing Service', :repository_url => repository_url})).to be true end end end end end
Version data entries
85 entries across 85 versions & 1 rubygems