Allow always send forward email
The new key only block notifications emails from Dashboard::Mailer. Fix specs.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
class Dashboard::Mailer < ApplicationMailer
|
class Dashboard::Mailer < ApplicationMailer
|
||||||
layout "mailer"
|
layout "mailer"
|
||||||
after_action :check_deliverability
|
after_action :check_deliverability, except: [:forward]
|
||||||
|
|
||||||
def forward(proposal)
|
def forward(proposal)
|
||||||
@proposal = proposal
|
@proposal = proposal
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ describe Dashboard::Mailer do
|
|||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
end
|
end
|
||||||
|
|
||||||
it "Disables email delivery using setting" do
|
it "Disables notification emails delivery using setting, does not affect the forward email" do
|
||||||
Setting["feature.dashboard.notification_emails"] = nil
|
Setting["feature.dashboard.notification_emails"] = nil
|
||||||
|
|
||||||
Dashboard::Mailer.forward(proposal).deliver_now
|
Dashboard::Mailer.forward(proposal).deliver_now
|
||||||
|
|
||||||
expect(ActionMailer::Base.deliveries.count).to eq(0)
|
expect(ActionMailer::Base.deliveries.count).to eq(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "sends forward email" do
|
it "sends forward email" do
|
||||||
|
|||||||
Reference in New Issue
Block a user