fix RequestOptions#merge + test for default options

This commit is contained in:
Ruslan Korolev committed 2015-08-18 14:13:21 +03:00
1 parent 8daeb2cc1e
commit f4f8b41017
2 files changed
+10 -2

No files matched your search

+8
View File
@@ -37,4 +37,12 @@ RSpec.describe Google::Apis::RequestOptions do
it 'should allow nil in merge' do
expect(options.merge(nil)).to be_an_instance_of(Google::Apis::RequestOptions)
end
it 'should override default options' do
Google::Apis::RequestOptions.default.header = 'Content-Length: 50'
opts = Google::Apis::RequestOptions.new
opts.header = 'Content-Length: 70'
expect(options.merge(opts).header).to eq 'Content-Length: 70'
end
end