Sha256: b3e7dc65b72adf9b2546738bb64ee43e408f8bb5700426494420ee2dcfb32d8e

Contents?: true

Size: 1.13 KB

Versions: 12

Compression:

Stored size: 1.13 KB

Contents

require "pact_broker/api/contracts/pacticipant_schema"

module PactBroker
  module Api
    module Contracts
      describe PacticipantSchema do
        let(:params) do
          {
            name: "pact-broker",
            displayName: "Pact Broker",
            mainBranch: main_branch,
            repositoryUrl: "https://github.com/pact-foundation/pact_broker",
            repositoryName: "pact_broker",
            repositoryNamespace: "pact-foundation"
          }
        end

        let(:main_branch) { "main" }

        subject { PacticipantSchema.call(params) }

        context "with valid params" do
          it { is_expected.to be_empty }
        end

        context "with empty params" do
          let(:params) do
            {
              repositoryUrl: "",
              repositoryName: "",
              repositoryNamespace: ""
            }
          end

          it { is_expected.to be_empty }
        end

        context "with branch names that contain spaces" do
          let(:main_branch) { "main foo" }

          its([:mainBranch, 0]) { is_expected.to include "cannot contain spaces" }
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pact_broker-2.89.1 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.89.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.88.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.87.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.86.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.85.1 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.85.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.84.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.83.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.82.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.81.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb
pact_broker-2.80.0 spec/lib/pact_broker/api/contracts/pacticipant_schema_spec.rb