Sha256: 71a12aec39933dbb2201f198e95ff4f1ee2fc4027020178b20108d0451cc6d04

Contents?: true

Size: 612 Bytes

Versions: 10

Compression:

Stored size: 612 Bytes

Contents

class TestIntegrationParams < Minitest::Test
  def setup
    @old_env_vars = ENV.keys.grep(/^TALONONE/).reduce({}) {|h, k| h.update(k => ENV.delete(k))}
  end

  def teardown
    ENV.update(@old_env_vars)
  end

  def test_initialize_parameter_normalization
    client = TalonOne::Integration::Client.new(
      endpoint: "https://this.will.have.no.trailing.slashes////",
      application_id: "1234",
      application_key: "blah"
    )

    normalized_endpoint = client.instance_eval do
      @endpoint.to_s
    end

    assert_equal normalized_endpoint, "https://this.will.have.no.trailing.slashes"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
talon_one-0.1.3 test/test_integration_params.rb
talon_one-0.1.2 test/test_integration_params.rb
talon_one-0.1.1 test/test_integration_params.rb
talon_one-0.1.0 test/test_integration_params.rb
talon_one-0.0.10 test/test_integration_params.rb
talon_one-0.0.9 test/test_integration_params.rb
talon_one-0.0.8 test/test_integration_params.rb
talon_one-0.0.7 test/test_integration_params.rb
talon_one-0.0.6 test/test_integration_params.rb
talon_one-0.0.5 test/test_integration_params.rb