diff --git a/config/site_settings.yml b/config/site_settings.yml index aa6e6002751..d07cc52ec2e 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -2235,7 +2235,7 @@ user_preferences: enum: "MailingListModeSiteSetting" default: 1 disable_mailing_list_mode: - default: false + default: true client: true default_email_previous_replies: enum: "PreviousRepliesSiteSetting" diff --git a/spec/models/topic_user_spec.rb b/spec/models/topic_user_spec.rb index f68f41b7728..d448a09e1d1 100644 --- a/spec/models/topic_user_spec.rb +++ b/spec/models/topic_user_spec.rb @@ -454,6 +454,7 @@ describe TopicUser do user1 = Fabricate(:user) Jobs.run_immediately! + SiteSetting.disable_mailing_list_mode = false SiteSetting.default_email_mailing_list_mode = true SiteSetting.default_email_mailing_list_mode_frequency = 1 diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 839481de5a4..1bfe16efdd8 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1682,6 +1682,7 @@ describe User do SiteSetting.default_email_digest_frequency = 1440 # daily SiteSetting.default_email_level = UserOption.email_level_types[:never] SiteSetting.default_email_messages_level = UserOption.email_level_types[:never] + SiteSetting.disable_mailing_list_mode = false SiteSetting.default_email_mailing_list_mode = true SiteSetting.default_other_new_topic_duration_minutes = -1 # not viewed diff --git a/spec/requests/email_controller_spec.rb b/spec/requests/email_controller_spec.rb index 68d9ed8b77d..3d79fb7aec4 100644 --- a/spec/requests/email_controller_spec.rb +++ b/spec/requests/email_controller_spec.rb @@ -212,6 +212,7 @@ RSpec.describe EmailController do end it 'correctly handles mailing list mode' do + SiteSetting.disable_mailing_list_mode = false user.user_option.update_columns(mailing_list_mode: true) navigate_to_unsubscribe diff --git a/spec/services/user_updater_spec.rb b/spec/services/user_updater_spec.rb index 717bc0aa5d5..ddc9371d662 100644 --- a/spec/services/user_updater_spec.rb +++ b/spec/services/user_updater_spec.rb @@ -91,6 +91,7 @@ describe UserUpdater do user = Fabricate(:user) updater = UserUpdater.new(acting_user, user) date_of_birth = Time.zone.now + SiteSetting.disable_mailing_list_mode = false theme = Fabricate(:theme, user_selectable: true) @@ -161,6 +162,7 @@ describe UserUpdater do it "disables email_digests when enabling mailing_list_mode" do user = Fabricate(:user) updater = UserUpdater.new(acting_user, user) + SiteSetting.disable_mailing_list_mode = false val = updater.update(mailing_list_mode: true, email_digests: true) expect(val).to be_truthy