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.89.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.89.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.88.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.87.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.86.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.85.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.85.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.84.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.83.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.82.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.81.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.80.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.79.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.79.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.78.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.78.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.77.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.76.2 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.76.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.76.0 spec/features/get_pacticipants_by_label_spec.rb