Skip to content

Commit

Permalink
Specs
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldrk committed Mar 9, 2025
1 parent c6a31fb commit 9525e95
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ def mock_pdf_fill
expect(DebtManagementCenter::VANotifyEmailJob).to receive(:perform_async).with(
email,
described_class::VHA_CONFIRMATION_TEMPLATE,
email_personalization_info
email_personalization_info,
{ id_type: 'email', failure_mailer: false }
)
service.send_vha_confirmation_email('ok',
{ 'email' => email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
expect(StatsD).to receive(:increment).with(key)
end

expect(StatsD).to receive(:increment).with(
'silent_failure', { tags: %w[service:debt-resolution function:register_failure] }
)

config.sidekiq_retries_exhausted_block.call(msg, standard_exception)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
expect(Rails.logger).to receive(:error).with(
"Form5655Submission id: #{form_submission.id} failed", 'VBS Submission Failed: abc-123'
)
expect(StatsD).to receive(:increment).with(
'silent_failure', { tags: %w[service:debt-resolution function:register_failure] }
)

expect(Rails.logger).to receive(:error).with(expected_log_message)
config.sidekiq_retries_exhausted_block.call(msg, standard_exception)
Expand Down
4 changes: 3 additions & 1 deletion spec/lib/debt_management_center/va_notify_email_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
Exception: #{exception.class} - #{exception.message}
Backtrace: #{exception.backtrace.join("\n")}
LOG
job = { 'args' => [nil, nil, nil, {}] }

expect(StatsD).to receive(:increment).with(
"#{DebtManagementCenter::VANotifyEmailJob::STATS_KEY}.retries_exhausted"
)
expect(Rails.logger).to receive(:error).with(expected_log_message)
config.sidekiq_retries_exhausted_block.call('unused', exception)
config.sidekiq_retries_exhausted_block.call(job, exception)
end
end
end

0 comments on commit 9525e95

Please sign in to comment.