Sha256: f5b0829c52c74b64af5ecfe6b62c5de5822751f190d8e1cb3bda02d1b810300b

Contents?: true

Size: 683 Bytes

Versions: 115

Compression:

Stored size: 683 Bytes

Contents

describe "Labelling a pacticipant" do

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

  subject { put path, nil, {'CONTENT_TYPE' => 'application/json'}; last_response  }

  context "when the pacticipant exists" do
    it "returns a 201 Created" do
      expect(subject.status).to be 201
    end

    it "returns a json body" do
      expect(subject.headers['Content-Type']).to eq "application/hal+json;charset=utf-8"
    end

    it "returns the label in the body" do
      expect(response_body_hash).to include expected_response_body
    end
  end
end

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
pact_broker-2.23.3 spec/features/label_pacticipant_spec.rb
pact_broker-2.23.2 spec/features/label_pacticipant_spec.rb
pact_broker-2.23.1 spec/features/label_pacticipant_spec.rb
pact_broker-2.23.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.22.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.21.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.20.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.19.2 spec/features/label_pacticipant_spec.rb
pact_broker-2.19.1 spec/features/label_pacticipant_spec.rb
pact_broker-2.19.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.18.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.17.1 spec/features/label_pacticipant_spec.rb
pact_broker-2.17.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.16.1 spec/features/label_pacticipant_spec.rb
pact_broker-2.16.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.15.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.14.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.13.1 spec/features/label_pacticipant_spec.rb
pact_broker-2.13.0 spec/features/label_pacticipant_spec.rb
pact_broker-2.12.0 spec/features/label_pacticipant_spec.rb