Merge branch 'master' of https://github.com/sqrrrl/google-api-ruby-client into sqrrrl-master

This commit is contained in:
Steve Bazyl committed 2017-04-03 12:31:20 -07:00
commit 48916bfce7
5 files changed
+40 -4

No files matched your search

+14
View File
@@ -196,6 +196,20 @@ EOF
end
end.to raise_error(Google::Apis::ClientError)
end
it 'should prevent mixing services in batch' do
expect do |b|
service.batch do |service|
command = service.send(:make_simple_command, :get, 'zoo/animals', {})
service.send(:execute_or_queue_command, command, &b)
service2 = service.dup
command2 = service.send(:make_simple_command, :get, 'zoo/animals', {})
service2.send(:execute_or_queue_command, command2, &b)
end
end.to raise_error
end
end
context 'with batch uploads' do
@@ -30,6 +30,7 @@ RSpec.describe Google::Apis::Generator do
puts generator.dump_api_names
tempdir = Dir.mktmpdir
generated_files.each do |key, content|
puts content
path = File.join(tempdir, key)
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') do |f|
@@ -47,6 +48,10 @@ RSpec.describe Google::Apis::Generator do
expect(service.root_url.to_s).to eql('https://www.googleapis.com/')
end
it 'should set the batch path' do
expect(service.batch_path).to eql('batch/test/v1')
end
it 'should define global methods from discovery' do
expect(service.method(:query)).to_not be_nil
end