spec/request_spec.rb in vertebrae-0.4.3 vs spec/request_spec.rb in vertebrae-0.5.0
- old
+ new
@@ -71,7 +71,17 @@
stub_request(:get, 'https://test2.com/path')
vb.request(:get, '/path', {}, options)
end
end
end
+
+ context 'with basic auth' do
+ let(:options) { {} }
+ let(:vb) { Vertebrae::API.new username: 'user', password: 'pass' }
+
+ it 'should make requests with basic auth' do
+ stub_request(:get, 'https://test3.com/path').with(basic_auth: ['user', 'pass'])
+ vb.request(:get, '/path', {}, {host: 'test3.com'})
+ end
+ end
end
end