Sha256: aedb008427a54e83a48d70fc5ef33110e27397aa95a172b977f57a7341cc5ad4

Contents?: true

Size: 667 Bytes

Versions: 80

Compression:

Stored size: 667 Bytes

Contents

describe "Deleting pact versions" do

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

  subject { delete(path)  }

  context "when the pact exists" do
    before do
      TestDataBuilder.new
        .create_pact_with_hierarchy("Foo", "1.2.3", "Bar")
        .create_provider("Baz")
        .create_pact
    end

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

80 entries across 80 versions & 1 rubygems

Version Path
pact_broker-2.75.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.74.1 spec/features/delete_pact_versions_spec.rb
pact_broker-2.74.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.73.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.72.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.71.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.70.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.69.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.68.1 spec/features/delete_pact_versions_spec.rb
pact_broker-2.68.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.67.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.66.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.65.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.64.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.63.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.62.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.61.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.60.1 spec/features/delete_pact_versions_spec.rb
pact_broker-2.60.0 spec/features/delete_pact_versions_spec.rb
pact_broker-2.59.2 spec/features/delete_pact_versions_spec.rb