Sha256: ba7757ddec232e1fa3eb26c4b4f05c2bc0161d2435be760e535002a75ce6909e

Contents?: true

Size: 665 Bytes

Versions: 25

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 200" do
      expect(subject.status).to be 200
    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

25 entries across 25 versions & 1 rubygems

Version Path
pact_broker-2.89.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.89.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.88.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.87.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.86.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.85.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.85.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.84.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.83.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.82.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.81.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.80.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.79.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.79.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.78.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.78.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.77.0 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.76.2 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.76.1 spec/features/delete_tagged_pact_versions_spec.rb
pact_broker-2.76.0 spec/features/delete_tagged_pact_versions_spec.rb