projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f736ac4
)
Test for repeated parameters
author
Martin Sarsale <martin@sumavisos.com>
Thu, 1 Dec 2011 14:04:40 +0000
(11:04 -0300)
committer
Martin Sarsale <martin@sumavisos.com>
Thu, 1 Dec 2011 14:04:40 +0000
(11:04 -0300)
spec/google/api_client/discovery_spec.rb
patch
|
blob
|
history
diff --git
a/spec/google/api_client/discovery_spec.rb
b/spec/google/api_client/discovery_spec.rb
index d0e38e4dba53782b634d36bcddcbf387a9807fce..6d0711abe329aecb3e50cbbdf1d01331146ec703 100644
(file)
--- a/
spec/google/api_client/discovery_spec.rb
+++ b/
spec/google/api_client/discovery_spec.rb
@@
-174,7
+174,16
@@
describe Google::APIClient do
(headers.inject({}) { |h,(k,v)| h[k]=v; h }).should == {}
body.should respond_to(:each)
end
(headers.inject({}) { |h,(k,v)| h[k]=v; h }).should == {}
body.should respond_to(:each)
end
-
+ it 'should generate valid requests when repeated parameters are passed' do
+ request = @client.generate_request(
+ :api_method => @prediction.training.insert,
+ :parameters => [['data', '1'],['data','2']]
+ )
+ method, uri, headers, body = request
+ method.should == 'POST'
+ uri.should ==
+ 'https://www.googleapis.com/prediction/v1.2/training?data=1&data=2'
+ end
it 'should generate requests against the correct URIs' do
request = @client.generate_request(
:api_method => @prediction.training.insert,
it 'should generate requests against the correct URIs' do
request = @client.generate_request(
:api_method => @prediction.training.insert,