Add application name to client, update style of assigning client to match other recent changes
This commit is contained in:
parent
8f453134d7
commit
c793138209
|
@ -17,7 +17,7 @@ require 'google/api_client'
|
|||
require 'google/api_client/version'
|
||||
|
||||
describe Google::APIClient::BatchRequest do
|
||||
CLIENT = Google::APIClient.new unless defined?(CLIENT)
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
after do
|
||||
# Reset client to not-quite-pristine state
|
||||
|
|
|
@ -43,7 +43,7 @@ end
|
|||
|
||||
describe Google::APIClient do
|
||||
include ConnectionHelpers
|
||||
CLIENT = Google::APIClient.new unless defined?(CLIENT)
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
after do
|
||||
# Reset client to not-quite-pristine state
|
||||
|
@ -53,7 +53,7 @@ describe Google::APIClient do
|
|||
|
||||
it 'should raise a type error for bogus authorization' do
|
||||
(lambda do
|
||||
Google::APIClient.new(:authorization => 42)
|
||||
Google::APIClient.new(:application_name => 'API Client Tests', :authorization => 42)
|
||||
end).should raise_error(TypeError)
|
||||
end
|
||||
|
||||
|
@ -258,7 +258,7 @@ describe Google::APIClient do
|
|||
it 'should allow modification to the base URIs for testing purposes' do
|
||||
# Using a new client instance here to avoid caching rebased discovery doc
|
||||
prediction_rebase =
|
||||
Google::APIClient.new.discovered_api('prediction', 'v1.2')
|
||||
Google::APIClient.new(:application_name => 'API Client Tests').discovered_api('prediction', 'v1.2')
|
||||
prediction_rebase.method_base =
|
||||
'https://testing-domain.example.com/prediction/v1.2/'
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ describe Google::APIClient::UploadIO do
|
|||
end
|
||||
|
||||
describe Google::APIClient::ResumableUpload do
|
||||
CLIENT ||= Google::APIClient.new
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
after do
|
||||
# Reset client to not-quite-pristine state
|
||||
|
|
|
@ -18,7 +18,7 @@ require 'google/api_client'
|
|||
require 'google/api_client/version'
|
||||
|
||||
describe Google::APIClient::Result do
|
||||
CLIENT ||= Google::APIClient.new
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
describe 'with the plus API' do
|
||||
before do
|
||||
|
|
|
@ -59,7 +59,7 @@ end
|
|||
describe Google::APIClient do
|
||||
include ConnectionHelpers
|
||||
|
||||
let(:client) { Google::APIClient.new }
|
||||
let(:client) { Google::APIClient.new(:application_name => 'API Client Tests') }
|
||||
|
||||
it 'should make its version number available' do
|
||||
Google::APIClient::VERSION::STRING.should be_instance_of(String)
|
||||
|
|
Loading…
Reference in New Issue