Update generator to use batchPath instead of hardcoded path
This commit is contained in:
1 parent
cf38f15a08
commit
687223feb4
3 files changed
+7
No files matched your search
Vendored
+1
@@ -7,6 +7,7 @@
|
||||
"basePath": "/test/",
|
||||
"rootUrl": "https://www.googleapis.com/",
|
||||
"servicePath": "test/v1/",
|
||||
"batchPath": "batch/test/v1",
|
||||
"rpcPath": "/rpc",
|
||||
"auth": {
|
||||
"oauth2": {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user