Sha256: f76fed76755932707f413b145c3061891930eea6288b5b54fc45b6913b52f2e6

Contents?: true

Size: 959 Bytes

Versions: 12

Compression:

Stored size: 959 Bytes

Contents

require "spec/support/test_data_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
      TestDataBuilder.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][:verificationResults].size).to eq 2
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pact_broker-2.89.1 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.89.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.88.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.87.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.86.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.85.1 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.85.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.84.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.83.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.82.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.81.0 spec/features/get_verifications_for_consumer_version_spec.rb
pact_broker-2.80.0 spec/features/get_verifications_for_consumer_version_spec.rb