X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/478795477985abe1f0f32caf2cbd4eae8b2d203f..719e576051cdbe6f5950f666248c0a64aacbd061:/spec/google/api_client_spec.rb diff --git a/spec/google/api_client_spec.rb b/spec/google/api_client_spec.rb index 7c7e298811..a38dafc80d 100644 --- a/spec/google/api_client_spec.rb +++ b/spec/google/api_client_spec.rb @@ -14,12 +14,12 @@ require 'spec_helper' +require 'signet/oauth_1/client' +require 'httpadapter/adapters/net_http' + require 'google/api_client' require 'google/api_client/version' require 'google/api_client/parser/json_parser' -require 'google/api_client/auth/oauth_1' -require 'google/api_client/transport/http_transport' - describe Google::APIClient, 'with default configuration' do before do @@ -33,6 +33,18 @@ describe Google::APIClient, 'with default configuration' do it 'should use the default JSON parser' do @client.parser.should be_instance_of(Google::APIClient::JSONParser) end + + it 'should use the default OAuth1 client configuration' do + @client.authorization.temporary_credential_uri.to_s.should == + 'https://www.google.com/accounts/OAuthGetRequestToken' + @client.authorization.authorization_uri.to_s.should include( + 'https://www.google.com/accounts/OAuthAuthorizeToken' + ) + @client.authorization.token_credential_uri.to_s.should == + 'https://www.google.com/accounts/OAuthGetAccessToken' + @client.authorization.client_credential_key.should == 'anonymous' + @client.authorization.client_credential_secret.should == 'anonymous' + end end describe Google::APIClient, 'with custom pluggable parser' do