Sha256: a4674e1d8d8af0b70ba818888cdb4bdad8051ae336257e1476427a7ceaf7cedb

Contents?: true

Size: 908 Bytes

Versions: 62

Compression:

Stored size: 908 Bytes

Contents

require 'spec/support/test_data_builder'

describe "Get pact versions" do
  let(:path) { "/pacts/provider/Provider/consumer/Consumer/versions" }
  let(:last_response_body) { JSON.parse(subject.body, symbolize_names: true) }

  subject { get path; last_response }

  context "when the pacts exist" do
    before do
      TestDataBuilder.new
        .create_provider("Provider")
        .create_consumer("Consumer")
        .create_consumer_version("1.0.0")
        .create_pact
        .create_consumer_version("1.0.1")
        .create_pact
    end

    it "returns a 200 response" do
      expect(subject.status).to be 200
    end

    it "returns a list of links to the pacts" do
      expect(last_response_body[:_links][:"pact-versions"].size).to eq 2
    end
  end

  context "when the pacts do not exist" do
    it "returns a 404 response" do
      expect(subject).to be_a_404_response
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

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