spec/googleauth/signet_spec.rb in googleauth-0.6.2 vs spec/googleauth/signet_spec.rb in googleauth-0.6.3
- old
+ new
@@ -39,14 +39,14 @@
describe Signet::OAuth2::Client do
before(:example) do
@key = OpenSSL::PKey::RSA.new(2048)
@client = Signet::OAuth2::Client.new(
- token_credential_uri: 'https://accounts.google.com/o/oauth2/token',
+ token_credential_uri: 'https://oauth2.googleapis.com/token',
scope: 'https://www.googleapis.com/auth/userinfo.profile',
issuer: 'app@example.com',
- audience: 'https://accounts.google.com/o/oauth2/token',
+ audience: 'https://oauth2.googleapis.com/token',
signing_key: @key
)
end
def make_auth_stubs(opts)
@@ -58,10 +58,10 @@
params = Addressable::URI.form_unencode(request.body)
_claim, _header = JWT.decode(params.assoc('assertion').last,
@key.public_key, true,
algorithm: 'RS256')
end
- stub_request(:post, 'https://accounts.google.com/o/oauth2/token')
+ stub_request(:post, 'https://oauth2.googleapis.com/token')
.with(body: hash_including(
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer'
), &blk)
.to_return(body: body,
status: 200,