Added ability to update the base URI in services, resources, and methods.

git-svn-id: https://google-api-ruby-client.googlecode.com/svn/trunk@102 c1d61fac-ed7f-fcc1-18f7-ff78120a04ef
This commit is contained in:
Bob Aman committed 2010-10-22 22:56:01 +00:00
1 parent f63bf8199f
commit 38f5bc5baf
2 files changed
+52

No files matched your search

+12
View File
@@ -200,6 +200,18 @@ describe Google::APIClient, 'configured for the prediction API' do
'https://www.googleapis.com/prediction/v1/training?query=12345'
end
it 'should allow modification to the base URIs for testing purposes' do
prediction = @client.discovered_service('prediction', 'v1')
prediction.base = 'https://testing-domain.googleapis.com/prediction/v1/'
request = @client.generate_request(
prediction.training.insert,
{'query' => '123'}
)
method, uri, headers, body = request
uri.should ==
'https://testing-domain.googleapis.com/prediction/v1/training?query=123'
end
it 'should generate signed requests' do
@client.authorization = :oauth_1
@client.authorization.token_credential_key = '12345'