Allow always send forward email

The new key only block notifications emails from Dashboard::Mailer.
Fix specs.
This commit is contained in:
taitus
2020-01-29 16:15:49 +01:00
parent 5608424510
commit b9792241ca
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
class Dashboard::Mailer < ApplicationMailer
layout "mailer"
after_action :check_deliverability
after_action :check_deliverability, except: [:forward]
def forward(proposal)
@proposal = proposal

View File

@@ -20,12 +20,12 @@ describe Dashboard::Mailer do
ActionMailer::Base.deliveries.clear
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
Dashboard::Mailer.forward(proposal).deliver_now
expect(ActionMailer::Base.deliveries.count).to eq(0)
expect(ActionMailer::Base.deliveries.count).to eq(1)
end
it "sends forward email" do