Sha256: b9bde000ce9d31a02011379c3fc2b0a554cf16e979bff897de740f2ce99e03b9

Contents?: true

Size: 665 Bytes

Versions: 60

Compression:

Stored size: 665 Bytes

Contents

describe "Deleting tagged pact versions" do

  let(:path) { "/pacts/provider/Bar/consumer/Foo/tag/prod" }

  subject { delete(path)  }

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

    it "deletes the pact" 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

60 entries across 60 versions & 1 rubygems

Version Path
pact_broker-2.42.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.41.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.40.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.39.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.38.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.38.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.37.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.36.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.36.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.35.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.34.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.33.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.32.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.31.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.30.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.29.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.27.6 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.27.5 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.27.4 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.27.3 spec/features/delete_tagged_pact_versions_spec.rb