diff --git a/app/mailers/dashboard/mailer.rb b/app/mailers/dashboard/mailer.rb index d6bb9da5b..f90b683d5 100644 --- a/app/mailers/dashboard/mailer.rb +++ b/app/mailers/dashboard/mailer.rb @@ -41,6 +41,6 @@ class Dashboard::Mailer < ApplicationMailer end def check_deliverability - mail.perform_deliveries = false unless Setting["dashboard.emails"] + mail.perform_deliveries = false unless Setting["feature.dashboard.notification_emails"] end end diff --git a/spec/lib/tasks/dashboards_spec.rb b/spec/lib/tasks/dashboards_spec.rb index 212979f91..6e50a31a1 100644 --- a/spec/lib/tasks/dashboards_spec.rb +++ b/spec/lib/tasks/dashboards_spec.rb @@ -6,7 +6,7 @@ describe "Dashboards Rake" do before do Rake.application.rake_require "tasks/dashboards" Rake::Task.define_task(:environment) - Setting["dashboard.emails"] = true + Setting["feature.dashboard.notification_emails"] = true ActionMailer::Base.deliveries.clear end diff --git a/spec/mailers/dashboard/mailer_spec.rb b/spec/mailers/dashboard/mailer_spec.rb index 9feb6836b..812c3cfe5 100644 --- a/spec/mailers/dashboard/mailer_spec.rb +++ b/spec/mailers/dashboard/mailer_spec.rb @@ -10,7 +10,7 @@ describe Dashboard::Mailer do end before do - Setting["dashboard.emails"] = true + Setting["feature.dashboard.notification_emails"] = true end describe "#forward" do @@ -21,7 +21,7 @@ describe Dashboard::Mailer do end it "Disables email delivery using setting" do - Setting["dashboard.emails"] = nil + Setting["feature.dashboard.notification_emails"] = nil Dashboard::Mailer.forward(proposal).deliver_now @@ -57,8 +57,8 @@ describe Dashboard::Mailer do describe "#new_actions_notification_rake_created" do let!(:proposal) { create(:proposal, :draft) } - it "Disables email delivery using setting" do - Setting["dashboard.emails"] = nil + it "Disables notification email delivery using setting" do + Setting["feature.dashboard.notification_emails"] = nil action.update!(published_proposal: false) resource.update!(published_proposal: false) @@ -102,8 +102,8 @@ describe Dashboard::Mailer do describe "#new_actions_notification_rake_published" do let!(:proposal) { create(:proposal) } - it "Disables email delivery using setting" do - Setting["dashboard.emails"] = nil + it "Disables notification email delivery using setting" do + Setting["feature.dashboard.notification_emails"] = nil ActionMailer::Base.deliveries.clear run_rake_task @@ -154,8 +154,8 @@ describe Dashboard::Mailer do let!(:proposal) { build(:proposal, :draft) } - it "Disables email delivery using setting" do - Setting["dashboard.emails"] = nil + it "Disables notification email delivery using setting" do + Setting["feature.dashboard.notification_emails"] = nil action.update!(published_proposal: false) resource.update!(published_proposal: false) @@ -220,8 +220,8 @@ describe Dashboard::Mailer do let!(:proposal) { build(:proposal, :draft) } - it "Disables email delivery using setting" do - Setting["dashboard.emails"] = nil + it "Disables notification email delivery using setting" do + Setting["feature.dashboard.notification_emails"] = nil proposal.save! proposal.publish diff --git a/spec/models/proposal_spec.rb b/spec/models/proposal_spec.rb index 416a2ceff..a510938cd 100644 --- a/spec/models/proposal_spec.rb +++ b/spec/models/proposal_spec.rb @@ -983,7 +983,7 @@ describe Proposal do describe "#send_new_actions_notification_on_create" do before do - Setting["dashboard.emails"] = true + Setting["feature.dashboard.notification_emails"] = true ActionMailer::Base.deliveries.clear end @@ -1008,7 +1008,7 @@ describe Proposal do describe "#send_new_actions_notification_on_published" do before do - Setting["dashboard.emails"] = true + Setting["feature.dashboard.notification_emails"] = true ActionMailer::Base.deliveries.clear end