Sha256: 01608c400b0f37b2d2c3cb42f26a1deabe86f857b8d92cce6998e32ebd76a772

Contents?: true

Size: 727 Bytes

Versions: 115

Compression:

Stored size: 727 Bytes

Contents

describe "Deleting a label" do

  before do
    TestDataBuilder.new
      .create_pacticipant("foo")
      .create_label("ios")
      .create_label("consumer")
      .create_pacticipant("bar")
      .create_label("ios")
      .create_label("consumer")
  end

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

  subject { delete path; last_response  }

  context "when the label exists" do
    it "returns a 204 No Content" do
      expect(subject.status).to be 204
    end

    it "deletes the label" do
      expect { subject }.to change { PactBroker::Domain::Label.count }.by(-1)
    end
  end
end

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/features/delete_label_spec.rb
pact_broker-2.79.0 spec/features/delete_label_spec.rb
pact_broker-2.78.1 spec/features/delete_label_spec.rb
pact_broker-2.78.0 spec/features/delete_label_spec.rb
pact_broker-2.77.0 spec/features/delete_label_spec.rb
pact_broker-2.76.2 spec/features/delete_label_spec.rb
pact_broker-2.76.1 spec/features/delete_label_spec.rb
pact_broker-2.76.0 spec/features/delete_label_spec.rb
pact_broker-2.75.0 spec/features/delete_label_spec.rb
pact_broker-2.74.1 spec/features/delete_label_spec.rb
pact_broker-2.74.0 spec/features/delete_label_spec.rb
pact_broker-2.73.0 spec/features/delete_label_spec.rb
pact_broker-2.72.0 spec/features/delete_label_spec.rb
pact_broker-2.71.0 spec/features/delete_label_spec.rb
pact_broker-2.70.0 spec/features/delete_label_spec.rb
pact_broker-2.69.0 spec/features/delete_label_spec.rb
pact_broker-2.68.1 spec/features/delete_label_spec.rb
pact_broker-2.68.0 spec/features/delete_label_spec.rb
pact_broker-2.67.0 spec/features/delete_label_spec.rb
pact_broker-2.66.0 spec/features/delete_label_spec.rb