Sha256: 2a573a2c95a2c167efc0b2f2e4046c879546d6f38f3853bfe9cbbc395728b54b
Contents?: true
Size: 1.72 KB
Versions: 17
Compression:
Stored size: 1.72 KB
Contents
=begin #Datadog API V1 Collection #Collection of all Datadog Public endpoints. The version of the OpenAPI document: 1.0 Contact: support@datadoghq.com Generated by: https://openapi-generator.tech Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2020-Present Datadog, Inc. =end require 'spec_helper' describe DatadogAPIClient::Configuration do let(:config) { DatadogAPIClient::Configuration.default } before(:each) do # uncomment below to setup host and base_path # require 'URI' # uri = URI.parse("https://api.datadoghq.com") # DatadogAPIClient.configure do |c| # c.host = uri.host # c.base_path = uri.path # end end describe '#base_url' do it 'should have the default value' do # uncomment below to test default value of the base path # expect(config.base_url).to eq("https://api.datadoghq.com") end it 'should remove trailing slashes' do [nil, '', '/', '//'].each do |base_path| config.base_path = base_path # uncomment below to test trailing slashes # expect(config.base_url).to eq("https://api.datadoghq.com") end end end describe '#backoff_base' do context 'when setting a valid backoff_base value > 2' do it 'sets the backoff_base attribute' do config.backoff_base = 3 expect(config.backoff_base).to eq(3) end end end context 'when setting an invalid backoff_base value < 2' do it 'raises an ArgumentError' do expect { config.backoff_base = 1 }.to raise_error(ArgumentError, 'backoff_base cannot be smaller than 2') end end end
Version data entries
17 entries across 17 versions & 1 rubygems