Skip to content

Commit

Permalink
Adding debug line requested in PR rpush#620
Browse files Browse the repository at this point in the history
Get tests working without all the ENV variables
  • Loading branch information
AnilRh committed Jan 24, 2024
1 parent 453a748 commit d6aefc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rpush/daemon/fcm/delivery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def retry_message

def obtain_access_token
authorizer = ::Google::Auth::ServiceAccountCredentials.make_creds(scope: SCOPE)
log_debug("FCM - Obtaining access token.")
authorizer.fetch_access_token
end

Expand Down
1 change: 1 addition & 0 deletions spec/functional/fcm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

allow(::Google::Auth::ServiceAccountCredentials).to receive(:fetch_access_token).and_return({access_token: 'bbbbbb'})
allow(::Google::Auth::ServiceAccountCredentials).to receive(:make_creds).and_return(creds)
allow_any_instance_of(::Rpush::Daemon::Fcm::Delivery).to receive(:necessary_data_exists?).and_return(true)
end

it 'delivers a notification successfully' do
Expand Down

0 comments on commit d6aefc2

Please sign in to comment.