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.75.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.74.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.74.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.73.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.72.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.71.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.70.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.69.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.68.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.68.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.67.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.66.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.65.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.64.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.63.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.62.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.61.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.60.1 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.60.0 spec/features/get_pacticipants_by_label_spec.rb
pact_broker-2.59.2 spec/features/get_pacticipants_by_label_spec.rb