Sha256: ce0b923068c45424eeec0766b12bb16b6acabdd7a75646c78e1bfc615267fe22
Contents?: true
Size: 784 Bytes
Versions: 2
Compression:
Stored size: 784 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe TokyoApi::Client do describe 'initialisation' do subject { described_class.new(options) } context 'with a basic_auth string parameter' do let(:options) { {basic_auth: 'login:password'} } it 'should set username/password on the configuration' do config = subject.connection.configuration expect(config.username).to eq 'login' expect(config.password).to eq 'password' end end context 'with a timeout' do let(:options) { {timeout: 5} } it 'should set the timeout on the faraday options' do config = subject.connection.configuration expect(config.faraday_options[:request][:timeout]).to eq 5 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tokyo_api-1.5.1 | spec/client_spec.rb |
tokyo_api-1.5.0 | spec/client_spec.rb |