spec/api/configuration_spec.rb in deepl-rb-2.1.0 vs spec/api/configuration_spec.rb in deepl-rb-2.2.0
- old
+ new
@@ -7,18 +7,20 @@
describe '#initialize' do
context 'When using default configuration attributes' do
it 'should use default attributes' do
expect(subject.auth_key).to eq(ENV['DEEPL_AUTH_KEY'])
expect(subject.host).to eq('https://api.deepl.com')
+ expect(subject.version).to eq('v2')
end
end
context 'When using custom configuration attributes' do
- let(:attributes) { { auth_key: 'SAMPLE', host: 'http://www.example.org' } }
+ let(:attributes) { { auth_key: 'SAMPLE', host: 'http://www.example.org', version: 'v1' } }
it 'should use custom attributes' do
expect(subject.auth_key).to eq(attributes[:auth_key])
expect(subject.host).to eq(attributes[:host])
+ expect(subject.version).to eq(attributes[:version])
end
end
end
describe '#validate!' do