Sha256: 7c5d778874797287721e565c5bde015c2b8ba5a99693dc2dcdabf8030344a12e

Contents?: true

Size: 926 Bytes

Versions: 109

Compression:

Stored size: 926 Bytes

Contents

require 'spec/support/test_data_builder'

describe "Get matrix for consumer and provider" do
  before do
    TestDataBuilder.new
      .create_pact_with_hierarchy('Consumer', '1.0.0', 'Provider')
      .create_verification(provider_version: '4.5.6')
  end

  let(:path) { "/matrix/provider/Provider/consumer/Consumer" }
  let(:last_response_body) { JSON.parse(subject.body, symbolize_names: true) }

  subject { get path; last_response }

  it "returns a 200 HAL JSON response" do
    expect(subject).to be_a_hal_json_success_response
  end

  it "returns the JSON representation of the matrix" do
    expect(last_response_body[:matrix][0][:consumer]).to be_instance_of(Hash)
    expect(last_response_body[:matrix][0][:provider]).to be_instance_of(Hash)
    expect(last_response_body[:matrix][0][:pact]).to be_instance_of(Hash)
    expect(last_response_body[:matrix][0][:verificationResult]).to be_instance_of(Hash)
  end
end

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
pact_broker-2.23.3 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.23.2 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.23.1 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.23.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.22.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.21.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.20.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.19.2 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.19.1 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.19.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.18.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.17.1 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.17.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.16.1 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.16.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.15.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.14.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.13.1 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.13.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb
pact_broker-2.12.0 spec/features/get_matrix_for_consumer_and_provider_spec.rb