Rename all ocurrences from this Setting to new key
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user