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.58.0 spec/features/get_versions_spec.rb
pact_broker-2.57.0 spec/features/get_versions_spec.rb
pact_broker-2.56.1 spec/features/get_versions_spec.rb
pact_broker-2.56.0 spec/features/get_versions_spec.rb
pact_broker-2.55.0 spec/features/get_versions_spec.rb
pact_broker-2.54.0 spec/features/get_versions_spec.rb
pact_broker-2.53.0 spec/features/get_versions_spec.rb
pact_broker-2.52.2 spec/features/get_versions_spec.rb
pact_broker-2.52.1 spec/features/get_versions_spec.rb
pact_broker-2.52.0 spec/features/get_versions_spec.rb
pact_broker-2.51.0 spec/features/get_versions_spec.rb
pact_broker-2.50.1 spec/features/get_versions_spec.rb
pact_broker-2.50.0 spec/features/get_versions_spec.rb
pact_broker-2.49.0 spec/features/get_versions_spec.rb
pact_broker-2.48.0 spec/features/get_versions_spec.rb
pact_broker-2.47.1 spec/features/get_versions_spec.rb
pact_broker-2.47.0 spec/features/get_versions_spec.rb
pact_broker-2.46.0 spec/features/get_versions_spec.rb
pact_broker-2.45.0 spec/features/get_versions_spec.rb
pact_broker-2.44.0 spec/features/get_versions_spec.rb