Sha256: a6900fad9883ee88ec0f1961d28cf64c65d1aaac080eae296624e26e73a1558d

Contents?: true

Size: 729 Bytes

Versions: 107

Compression:

Stored size: 729 Bytes

Contents

describe "Publishing a pact" do

  let(:request_body) { {'repositoryUrl' => 'http://foo'} }
  let(:path) { "/pacticipants/Some%20Consumer" }
  let(:response_body_json) { JSON.parse(subject.body) }

  subject { patch path, request_body.to_json, {'CONTENT_TYPE' => 'application/json' }; last_response  }

  context "when the pacticipant exists" do

    before do
      TestDataBuilder.new.create_pacticipant("Some Consumer")
    end
    it "returns a 200 OK" do
      puts subject.body unless subject.status == 200
      expect(subject.status).to be 200
    end

    it "returns a json body with the updated pacticipant" do
      expect(subject.headers['Content-Type']).to eq "application/hal+json;charset=utf-8"
    end
  end
end

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/features/update_pacticipant_spec.rb
pact_broker-2.79.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.78.1 spec/features/update_pacticipant_spec.rb
pact_broker-2.78.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.77.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.76.2 spec/features/update_pacticipant_spec.rb
pact_broker-2.76.1 spec/features/update_pacticipant_spec.rb
pact_broker-2.76.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.75.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.74.1 spec/features/update_pacticipant_spec.rb
pact_broker-2.74.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.73.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.72.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.71.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.70.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.69.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.68.1 spec/features/update_pacticipant_spec.rb
pact_broker-2.68.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.67.0 spec/features/update_pacticipant_spec.rb
pact_broker-2.66.0 spec/features/update_pacticipant_spec.rb