Skip to content

Commit

Permalink
Amend spec logic to avoid repeated subject call
Browse files Browse the repository at this point in the history
  • Loading branch information
Kizr committed Oct 21, 2024
1 parent c99d555 commit 582ab95
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions spec/services/placements/partnerships/notify/create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,14 @@
end

it "does not send a notification email to users not belonging to the placements service" do
expect { partnership_notify_creation }.not_to have_enqueued_mail(
Placements::SchoolUserMailer,
:partnership_created_notification,
).with(
user_3, provider, school
)
expect { partnership_notify_creation }.not_to have_enqueued_mail(
Placements::ProviderUserMailer,
:partnership_created_notification,
).with(
user_3, provider, school
)
%i[SchoolUserMailer ProviderUserMailer].each do |mailer_class|
expect { partnership_notify_creation }.not_to have_enqueued_mail(
"Placements::#{mailer_class}".constantize,
:partnership_created_notification,
).with(
user_3, provider, school
)
end
end
end
end
Expand Down

0 comments on commit 582ab95

Please sign in to comment.