Method: NamedTests#oauth2_auth_token

Defined in:
src/ruby/pb/test/client.rb

#oauth2_auth_tokenObject



346
347
348
349
350
351
352
353
354
355
# File 'src/ruby/pb/test/client.rb', line 346

def oauth2_auth_token
  resp = perform_large_unary(fill_username: true,
                             fill_oauth_scope: true)
  json_key = File.read(ENV[AUTH_ENV])
  wanted_email = MultiJson.load(json_key)['client_email']
  assert("#{__callee__}: bad username") { wanted_email == resp.username }
  assert("#{__callee__}: bad oauth scope") do
    @args.oauth_scope.include?(resp.oauth_scope)
  end
end