Sha256: 01634ee96823a2092bcee3acebd4ca5085e4b64ef2c599695d29fd99d8747a8c

Contents?: true

Size: 621 Bytes

Versions: 11

Compression:

Stored size: 621 Bytes

Contents

require 'pact_broker/domain/version'

module PactBroker

  module Domain

    describe Version do
      describe "#latest_pact_publication" do
        let!(:pact) do
          ProviderStateBuilder.new
            .create_consumer
            .create_provider
            .create_consumer_version
            .create_pact
            .revise_pact
            .and_return(:pact)
        end
        let(:version) { Version.order(:id).last }

        it "returns the latest pact revision for the consumer version" do
          expect(version.latest_pact_publication.id).to eq pact.id
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pact_broker-2.0.2 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.1 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.8 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.7 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.6 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.5 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.4 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.3 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.2 spec/lib/pact_broker/domain/version_spec.rb
pact_broker-2.0.0.beta.1 spec/lib/pact_broker/domain/version_spec.rb