Sha256: 5e680975dc3f3a53163a6d6f15354deefbcc042cf57d60337588f6baff68a14f

Contents?: true

Size: 1.39 KB

Versions: 42

Compression:

Stored size: 1.39 KB

Contents

require 'pact_broker/client/generate_display_name'

module PactBroker
  module Client
    describe GenerateDisplayName do
      describe ".call" do
        TEST_CASES = {
          "foo" => "Foo",
          "MyService" => "My Service",
          "my-service" => "My Service",
          "my_service" => "My Service",
          "my service" => "My Service",
          "ABCService" => "ABC Service",
          "A4Service" => "A4 Service",
          "SNSPactEventConsumer" => "SNS Pact Event Consumer",
          "AWSSummiteerWeb" => "AWS Summiteer Web",
          "Beer-Consumer" => "Beer Consumer",
          "foo.pretend-consumer" => "Foo Pretend Consumer",
          "Client-XX" => "Client XX",
          "providerJSWorkshop" => "Provider JS Workshop",
          "e2e Provider Example" => "E2e Provider Example",
          "MP - Our Provider" => "MP - Our Provider",
          "PoC - Pact-broker-consumer" => "PoC - Pact Broker Consumer",
          "QB-DATABASE Service" => "QB DATABASE Service",
          "Support Species App (Provider)" => "Support Species App (Provider)",
          9 => "9",
          "" => "",
          nil => nil
        }

        TEST_CASES.each do | name, expected_display_name |
          it "converts #{name.inspect} to #{expected_display_name.inspect}" do
            expect(GenerateDisplayName.call(name)).to eq expected_display_name
          end
        end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
pact_broker-client-1.75.3 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.75.1 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.75.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.74.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.73.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.72.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.71.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.70.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.69.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.68.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.67.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.66.1 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.66.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.65.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.64.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.63.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.62.1 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.62.0 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.61.1 spec/lib/pact_broker/client/generate_display_name_spec.rb
pact_broker-client-1.61.0 spec/lib/pact_broker/client/generate_display_name_spec.rb