Rename all ocurrences from this Setting to new key
This commit is contained in:
@@ -41,6 +41,6 @@ class Dashboard::Mailer < ApplicationMailer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_deliverability
|
def check_deliverability
|
||||||
mail.perform_deliveries = false unless Setting["dashboard.emails"]
|
mail.perform_deliveries = false unless Setting["feature.dashboard.notification_emails"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ describe "Dashboards Rake" do
|
|||||||
before do
|
before do
|
||||||
Rake.application.rake_require "tasks/dashboards"
|
Rake.application.rake_require "tasks/dashboards"
|
||||||
Rake::Task.define_task(:environment)
|
Rake::Task.define_task(:environment)
|
||||||
Setting["dashboard.emails"] = true
|
Setting["feature.dashboard.notification_emails"] = true
|
||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ describe Dashboard::Mailer do
|
|||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
Setting["dashboard.emails"] = true
|
Setting["feature.dashboard.notification_emails"] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#forward" do
|
describe "#forward" do
|
||||||
@@ -21,7 +21,7 @@ describe Dashboard::Mailer do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "Disables email delivery using setting" do
|
it "Disables email delivery using setting" do
|
||||||
Setting["dashboard.emails"] = nil
|
Setting["feature.dashboard.notification_emails"] = nil
|
||||||
|
|
||||||
Dashboard::Mailer.forward(proposal).deliver_now
|
Dashboard::Mailer.forward(proposal).deliver_now
|
||||||
|
|
||||||
@@ -57,8 +57,8 @@ describe Dashboard::Mailer do
|
|||||||
describe "#new_actions_notification_rake_created" do
|
describe "#new_actions_notification_rake_created" do
|
||||||
let!(:proposal) { create(:proposal, :draft) }
|
let!(:proposal) { create(:proposal, :draft) }
|
||||||
|
|
||||||
it "Disables email delivery using setting" do
|
it "Disables notification email delivery using setting" do
|
||||||
Setting["dashboard.emails"] = nil
|
Setting["feature.dashboard.notification_emails"] = nil
|
||||||
|
|
||||||
action.update!(published_proposal: false)
|
action.update!(published_proposal: false)
|
||||||
resource.update!(published_proposal: false)
|
resource.update!(published_proposal: false)
|
||||||
@@ -102,8 +102,8 @@ describe Dashboard::Mailer do
|
|||||||
describe "#new_actions_notification_rake_published" do
|
describe "#new_actions_notification_rake_published" do
|
||||||
let!(:proposal) { create(:proposal) }
|
let!(:proposal) { create(:proposal) }
|
||||||
|
|
||||||
it "Disables email delivery using setting" do
|
it "Disables notification email delivery using setting" do
|
||||||
Setting["dashboard.emails"] = nil
|
Setting["feature.dashboard.notification_emails"] = nil
|
||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
|
|
||||||
run_rake_task
|
run_rake_task
|
||||||
@@ -154,8 +154,8 @@ describe Dashboard::Mailer do
|
|||||||
|
|
||||||
let!(:proposal) { build(:proposal, :draft) }
|
let!(:proposal) { build(:proposal, :draft) }
|
||||||
|
|
||||||
it "Disables email delivery using setting" do
|
it "Disables notification email delivery using setting" do
|
||||||
Setting["dashboard.emails"] = nil
|
Setting["feature.dashboard.notification_emails"] = nil
|
||||||
|
|
||||||
action.update!(published_proposal: false)
|
action.update!(published_proposal: false)
|
||||||
resource.update!(published_proposal: false)
|
resource.update!(published_proposal: false)
|
||||||
@@ -220,8 +220,8 @@ describe Dashboard::Mailer do
|
|||||||
|
|
||||||
let!(:proposal) { build(:proposal, :draft) }
|
let!(:proposal) { build(:proposal, :draft) }
|
||||||
|
|
||||||
it "Disables email delivery using setting" do
|
it "Disables notification email delivery using setting" do
|
||||||
Setting["dashboard.emails"] = nil
|
Setting["feature.dashboard.notification_emails"] = nil
|
||||||
|
|
||||||
proposal.save!
|
proposal.save!
|
||||||
proposal.publish
|
proposal.publish
|
||||||
|
|||||||
@@ -983,7 +983,7 @@ describe Proposal do
|
|||||||
|
|
||||||
describe "#send_new_actions_notification_on_create" do
|
describe "#send_new_actions_notification_on_create" do
|
||||||
before do
|
before do
|
||||||
Setting["dashboard.emails"] = true
|
Setting["feature.dashboard.notification_emails"] = true
|
||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1008,7 +1008,7 @@ describe Proposal do
|
|||||||
|
|
||||||
describe "#send_new_actions_notification_on_published" do
|
describe "#send_new_actions_notification_on_published" do
|
||||||
before do
|
before do
|
||||||
Setting["dashboard.emails"] = true
|
Setting["feature.dashboard.notification_emails"] = true
|
||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user