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.71.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.70.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.69.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.68.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.68.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.67.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.66.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.65.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.64.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.63.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.62.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.61.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.60.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.60.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.59.2 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.59.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.59.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.58.3 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.58.2 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.58.0 spec/features/delete_tagged_pact_versions_spec.rb