Skip to content

Commit

Permalink
replace 'anything' in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrillberg committed Dec 3, 2024
1 parent aca2ee1 commit 80cfd9d
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions modules/simple_forms_api/spec/services/notification_email_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
let(:user_account) { create(:user_account) }

it 'sends the email at the specified time' do
time = double
time = Time.zone.now
profile = double(given_names: ['Bob'])
mpi_profile = double(profile:, error: nil)
allow(VANotify::UserAccountJob).to receive(:perform_at)
Expand All @@ -126,8 +126,27 @@

subject.send(at: time)

expect(VANotify::UserAccountJob).to have_received(:perform_at).with(time, user_account.id, anything,
anything, anything, anything)
expect(VANotify::UserAccountJob).to have_received(:perform_at).with(
time,
user_account.id,
"form21_10210_#{notification_type}_email_template_id",
{
'confirmation_number' => 'confirmation_number',
'date_submitted' => time.strftime('%B %d, %Y'),
'first_name' => 'Bob',
'lighthouse_updated_at' => nil
},
'fake_secret',
{
callback_metadata: {
form_number: 'vba_21_10210',
notification_type:,
statsd_tags: {
'function' => 'vba_21_10210 form submission to Lighthouse', 'service' => 'veteran-facing-forms'
}
}
}
)
end
end

Expand Down

0 comments on commit 80cfd9d

Please sign in to comment.