fix(mailer): fix delivery prevented with bcc
This commit is contained in:
parent
395967e0a1
commit
ec269a568c
2 changed files with 10 additions and 2 deletions
|
@ -2,8 +2,8 @@ RSpec.describe BalancerDeliveryMethod do
|
|||
class ExampleMailer < ApplicationMailer
|
||||
include BalancedDeliveryConcern
|
||||
|
||||
def greet(name, bypass_unverified_mail_protection: true)
|
||||
mail(to: name, from: "smtp_from", body: "Hello #{name}")
|
||||
def greet(name, bypass_unverified_mail_protection: true, **mail_args)
|
||||
mail(to: name, from: "smtp_from", body: "Hello #{name}", **mail_args)
|
||||
|
||||
bypass_unverified_mail_protection! if bypass_unverified_mail_protection
|
||||
end
|
||||
|
@ -202,6 +202,13 @@ RSpec.describe BalancerDeliveryMethod do
|
|||
it { expect(mail).to have_been_delivered_using(MockSmtp) }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when there are only bcc recipients' do
|
||||
let(:bypass_unverified_mail_protection) { false }
|
||||
let(:mail) { ExampleMailer.greet(nil, bypass_unverified_mail_protection: false, bcc: ["'u@a.com'"]) }
|
||||
|
||||
it { expect(mail).to have_been_delivered_using(MockSmtp) }
|
||||
end
|
||||
end
|
||||
|
||||
# Helpers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue