Sha256: 2f3b9e34e2c0f02dd80e97a7fb9a2844c312ccbfb97e8952dd8b5229f21f6bc7

Contents?: true

Size: 725 Bytes

Versions: 127

Compression:

Stored size: 725 Bytes

Contents

describe "Get pacticipants by label" do

  let(:path) { "/pacticipants/label/ios" }
  let(:response_body_hash) { JSON.parse(subject.body, symbolize_names: true) }
  let(:expected_response_body) { {name: "Foo"} }

  subject { get path; last_response }

  context "when the pacts exist" do

    before do
      TestDataBuilder.new
        .create_pacticipant("Foo")
        .create_label("ios")
        .create_pacticipant("Bar")
        .create_label("android")
    end

    it "returns a 200 OK" do
      expect(subject).to be_a_hal_json_success_response
    end

    it "returns a list of pacticipants" do
      expect(response_body_hash[:_embedded][:pacticipants].first).to include expected_response_body
    end
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
pact_broker-2.29.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.27.6 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.27.5 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.27.4 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.27.3 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.27.2 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.27.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.26.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.26.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.25.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.24.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.23.4 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.23.3 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.23.2 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.23.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.23.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.22.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.21.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.20.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.19.2 spec/features/get_pacticipants_by_label_spec.rb