Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ient into new_programming_interface
  • Loading branch information
Sergio Gomes committed Oct 4, 2013
2 parents d7bd712 + 5c31b69 commit 00f6663
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions spec/google/api_client/batch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@call1 = {
:api_method => @discovery.apis.get_rest,
:parameters => {
'api' => 'adsense',
'api' => 'plus',
'version' => 'v1'
}
}
Expand Down Expand Up @@ -118,7 +118,7 @@
@call1 = {
:api_method => @discovery.apis.get_rest,
:parameters => {
'api' => 'adsense',
'api' => 'plus',
'version' => 'v1'
}
}
Expand Down Expand Up @@ -244,6 +244,6 @@
#request[:body].read.gsub("\r", "").should =~ expected_body
end
end

end
end
14 changes: 7 additions & 7 deletions spec/google/api_client/discovery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

it 'should correctly determine the discovery URI if :user_ip is set' do
CLIENT.user_ip = '127.0.0.1'

conn = stub_connection do |stub|
stub.get('/discovery/v1/apis/prediction/v1.2/rest?userIp=127.0.0.1') do |env|
end
Expand Down Expand Up @@ -199,8 +199,8 @@

it 'should generate valid requests when parameter value includes semicolon' do
conn = stub_connection do |stub|
# semicolon (;) in parameter value was being converted to
# bare ampersand (&) in 0.4.7. ensure that it gets converted
# semicolon (;) in parameter value was being converted to
# bare ampersand (&) in 0.4.7. ensure that it gets converted
# to a CGI-escaped semicolon (%3B) instead.
stub.post('/prediction/v1.2/training?data=12345%3B67890') do |env|
env[:body].should == ''
Expand Down Expand Up @@ -266,7 +266,7 @@
env[:url].host.should == 'testing-domain.example.com'
end
end

request = CLIENT.execute(
:api_method => prediction_rebase.training.insert,
:parameters => {'data' => '123'},
Expand Down Expand Up @@ -417,7 +417,7 @@
stub.get('/plus/v1/people/107807692475771887386/activities/public') do |env|
end
end

request = CLIENT.execute(
:api_method => @plus.activities.list,
:parameters => {
Expand Down Expand Up @@ -474,12 +474,12 @@

it 'should find methods that are in the discovery document' do
CLIENT.discovered_method(
'adsense.reports.generate', 'adsense'
'adsense.reports.generate', 'adsense', 'v1.3'
).name.should == 'generate'
end

it 'should not find methods that are not in the discovery document' do
CLIENT.discovered_method('adsense.bogus', 'adsense').should == nil
CLIENT.discovered_method('adsense.bogus', 'adsense', 'v1.3').should == nil
end

it 'should generate requests against the correct URIs' do
Expand Down

0 comments on commit 00f6663

Please sign in to comment.