Sha256: 6e26a6e0cf39f4139fba1da4760387c9e158e767969ab8e72332b7f90cdebdf7
Contents?: true
Size: 1019 Bytes
Versions: 139
Compression:
Stored size: 1019 Bytes
Contents
describe "Publishing a contract that is not a pact" do let(:path) { "/pacts/provider/A%20Provider/consumer/A%20Consumer/versions/1.2.3" } let(:parsed_response_body) { JSON.parse(subject.body) } subject { put path, pact_content, {'CONTENT_TYPE' => 'application/json' }; last_response } context "when the pact is another type of CDC that doesn't have the Consumer or Provider names in the expected places" do let(:pact_content) { {a: 'not pact'}.to_json } it "accepts the un-pact Pact" do expect(subject.status).to be 201 end it "returns the content" do expect(parsed_response_body).to include 'a' => 'not pact' end it "returns _links" do expect(parsed_response_body).to have_key '_links' end end context "when the content is an array" do let(:pact_content) { '[1]' } it "accepts the un-pact Pact" do expect(subject.status).to be 201 end it "returns the content" do expect(parsed_response_body).to eq [1] end end end
Version data entries
139 entries across 139 versions & 1 rubygems