Sha256: 48768d8aa6965b574afe76a5dcc270b82e21ab66986e459ba3fccc5bd260ca3e

Contents?: true

Size: 822 Bytes

Versions: 87

Compression:

Stored size: 822 Bytes

Contents

require 'spec/support/test_data_builder'

describe "Get versions" do

  let(:path) { "/pacticipants/Consumer/versions" }
  let(:last_response_body) { JSON.parse(subject.body, symbolize_names: true) }

  subject { get path; last_response }

  context "when the pacticipant exists" do

    before do
      TestDataBuilder.new
        .create_consumer("Consumer")
        .create_consumer_version("1.0.0")
        .create_consumer_version("1.0.1")
    end

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

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

  end

  context "when the pacticipant does not exist" do

    it "returns a 404 response" do
      expect(subject).to be_a_404_response
    end

  end
end

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
pact_broker-2.27.3 spec/features/get_versions_spec.rb
pact_broker-2.27.2 spec/features/get_versions_spec.rb
pact_broker-2.27.0 spec/features/get_versions_spec.rb
pact_broker-2.26.1 spec/features/get_versions_spec.rb
pact_broker-2.26.0 spec/features/get_versions_spec.rb
pact_broker-2.25.0 spec/features/get_versions_spec.rb
pact_broker-2.24.0 spec/features/get_versions_spec.rb
pact_broker-2.23.4 spec/features/get_versions_spec.rb
pact_broker-2.23.3 spec/features/get_versions_spec.rb
pact_broker-2.23.2 spec/features/get_versions_spec.rb
pact_broker-2.23.1 spec/features/get_versions_spec.rb
pact_broker-2.23.0 spec/features/get_versions_spec.rb
pact_broker-2.22.0 spec/features/get_versions_spec.rb
pact_broker-2.21.0 spec/features/get_versions_spec.rb
pact_broker-2.20.0 spec/features/get_versions_spec.rb
pact_broker-2.19.2 spec/features/get_versions_spec.rb
pact_broker-2.19.1 spec/features/get_versions_spec.rb
pact_broker-2.19.0 spec/features/get_versions_spec.rb
pact_broker-2.18.0 spec/features/get_versions_spec.rb
pact_broker-2.17.1 spec/features/get_versions_spec.rb