Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfrg committed Nov 14, 2023
1 parent 3db521a commit 50474fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_google_ads_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,14 @@ def test_default_to_updater_proc
# end
# end

def test_keyfile_without_impersonate_raises
def test_crendetials_work_with_service_account_keyfile
client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|
config.keyfile = 'keyfile'
config.keyfile = 'test/fixtures/keyfile.json'
end

assert_raises do
assert_raises(OpenSSL::PKey::RSAError) do
# OpenSSL::PKey::RSAError means it read the test file and tried to
# initialize a key with it. Since it's not a valid key, it raises.
client.get_credentials
end
end
Expand Down

0 comments on commit 50474fe

Please sign in to comment.