Sha256: f15f2b9ac7005dcba698006ade5c075734b90d3b58f82e00db755d2c7bc31f15

Contents?: true

Size: 1.03 KB

Versions: 38

Compression:

Stored size: 1.03 KB

Contents

require 'pact_broker/pacts/pact_publication'

module PactBroker
  module Pacts
    describe PactPublication do

      describe "#latest_tag_names" do
        before do
          td.create_pact_with_hierarchy("Foo", "1.2.3", "Bar")
            .create_consumer_version_tag("no")
            .create_consumer_version("3.4.5")
            .create_consumer_version_tag("yes")
            .create_pact
            .create_consumer_version("5.6.7")
            .create_consumer_version_tag("no")
        end

        let(:td) { TestDataBuilder.new }
        let(:pact_publication) { PactPublication.find(id: td.pact.id) }

        context "when the pact is the latest for a tag" do
          it "returns the relevant tag names" do
            expect(pact_publication.latest_tag_names).to eq ["yes"]
          end
        end

        context "when the pact is not the latest for a tag" do
          it "returns the relevant tag names" do
            expect(pact_publication.latest_tag_names).to eq ["yes"]
          end
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
pact_broker-2.32.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.31.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.30.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.29.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.27.6 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.27.5 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.27.4 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.27.3 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.27.2 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.27.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.26.1 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.26.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.25.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.24.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.23.4 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.23.3 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.23.2 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.23.1 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.23.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb
pact_broker-2.22.0 spec/lib/pact_broker/pacts/pact_publication_spec.rb