Sha256: d4e480d3ff7144f028a71c5853a425f4f45b07a3e02a2e183e114f60f910ff2f

Contents?: true

Size: 1.41 KB

Versions: 84

Compression:

Stored size: 1.41 KB

Contents

require 'pact_broker/domain/verification'

module PactBroker

  module Domain
    describe Verification do

      describe "#save" do
        let!(:verification) do
          TestDataBuilder.new
            .create_pact_with_hierarchy("A", "1", "B")
            .create_verification(test_results: {'some' => 'thing'})
            .and_return(:verification)
        end

        it "saves and loads the test_results" do
          expect(Verification.find(id: verification.id).test_results).to eq({ 'some' => 'thing' })
        end
      end

      describe "#consumer" do
        let!(:consumer) do
          TestDataBuilder.new
            .create_consumer
            .create_provider
            .create_consumer_version
            .create_pact
            .create_verification
            .and_return(:consumer)
        end

        it "returns the consumer for the verification" do
          expect(Verification.order(:id).first.consumer).to eq consumer
        end
      end

      describe "#provider" do
        let!(:provider) do
          TestDataBuilder.new
            .create_consumer
            .create_provider
            .create_consumer_version
            .create_pact
            .create_verification
            .and_return(:provider)
        end

        it "returns the provider for the verification" do
          expect(Verification.order(:id).first.provider).to eq provider
        end
      end
    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
pact_broker-2.69.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.68.1 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.68.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.67.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.66.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.65.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.64.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.63.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.62.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.61.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.60.1 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.60.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.59.2 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.59.1 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.59.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.58.3 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.58.2 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.58.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.57.0 spec/lib/pact_broker/domain/verification_spec.rb
pact_broker-2.56.1 spec/lib/pact_broker/domain/verification_spec.rb