Sha256: 66e97c6d93db2e56fac424881cf027e0229174298a0c3119905c50a2a3491b02
Contents?: true
Size: 1.2 KB
Versions: 20
Compression:
Stored size: 1.2 KB
Contents
require 'pact_broker/versions/service' module PactBroker module Versions describe Service do describe ".delete" do let(:td) { TestDataBuilder.new } let!(:version) do td .create_consumer .create_provider .create_consumer_version("1.2.3") .create_consumer_version_tag("prod") .create_pact .create_verification(provider_version: "1.0.0") .and_return(:consumer_version) end subject { Service.delete(version) } it "deletes the pact publication" do expect{ subject }.to change { PactBroker::Pacts::PactPublication.count }.by(-1) end it "deletes the tags" do expect{ subject }.to change { PactBroker::Domain::Tag.count }.by(-1) end it "deletes the version" do expect{ subject }.to change { PactBroker::Domain::Version.count }.by(-1) end context "when deleting a provider version" do it "deletes associated verifications" do expect { Service.delete(td.provider_version ) }. to change { PactBroker::Domain::Verification.count }.by(-1) end end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems