Sha256: b55e5bda47323d7a5bea5b756c7a852fd4f18026b6fc9f23c67864e3d16b4413

Contents?: true

Size: 654 Bytes

Versions: 31

Compression:

Stored size: 654 Bytes

Contents

describe "Deleting pact versions" do

  let(:path) { "/integrations/provider/Bar/consumer/Foo" }

  subject { delete(path)  }

  context "when the integration exists" do
    before do
      TestDataBuilder.new
        .create_pact_with_hierarchy("Foo", "1.2.3", "Bar")
    end

    it "deletes the resource associated with the integration" do
      expect{ subject }.to change{ PactBroker::Pacts::PactPublication.count }.by(-1)
    end

    it "returns a 204" do
      expect(subject.status).to be 204
    end
  end

  context "when the pact does not exist" do
    it "returns a 404 Not Found" do
      expect(subject.status).to be 404
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
pact_broker-2.55.0 spec/features/delete_integration_spec.rb
pact_broker-2.54.0 spec/features/delete_integration_spec.rb
pact_broker-2.53.0 spec/features/delete_integration_spec.rb
pact_broker-2.52.2 spec/features/delete_integration_spec.rb
pact_broker-2.52.1 spec/features/delete_integration_spec.rb
pact_broker-2.52.0 spec/features/delete_integration_spec.rb
pact_broker-2.51.0 spec/features/delete_integration_spec.rb
pact_broker-2.50.1 spec/features/delete_integration_spec.rb
pact_broker-2.50.0 spec/features/delete_integration_spec.rb
pact_broker-2.49.0 spec/features/delete_integration_spec.rb
pact_broker-2.48.0 spec/features/delete_integration_spec.rb
pact_broker-2.47.1 spec/features/delete_integration_spec.rb
pact_broker-2.47.0 spec/features/delete_integration_spec.rb
pact_broker-2.46.0 spec/features/delete_integration_spec.rb
pact_broker-2.45.0 spec/features/delete_integration_spec.rb
pact_broker-2.44.0 spec/features/delete_integration_spec.rb
pact_broker-2.43.0 spec/features/delete_integration_spec.rb
pact_broker-2.42.0 spec/features/delete_integration_spec.rb
pact_broker-2.41.0 spec/features/delete_integration_spec.rb
pact_broker-2.40.0 spec/features/delete_integration_spec.rb