Sha256: 9afbfb0b7e8000a1a2bc8322594eea4f18cb71860411c7b414375f03464f0be4
Contents?: true
Size: 972 Bytes
Versions: 3
Compression:
Stored size: 972 Bytes
Contents
require 'spec/support/provider_state_builder' describe "Get verifications for consumer version" do let(:path) { "/verification-results/consumer/Consumer/version/1.2.3/latest" } let(:last_response_body) { JSON.parse(subject.body, symbolize_names: true) } subject { get path; last_response } context "when the consumer exists" do before do ProviderStateBuilder.new .create_provider("Provider") .create_consumer("Consumer") .create_consumer_version("1.2.3") .create_pact .create_verification(number: 1) .create_verification(number: 2) .create_provider("Another provider") .create_pact .create_verification(number: 1) end it "returns a 200 HAL JSON response" do expect(subject).to be_a_hal_json_success_response end it "returns a list of verifications" do expect(last_response_body[:_embedded][:'verification-results'].size).to eq 2 end end end
Version data entries
3 entries across 3 versions & 1 rubygems