summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/settings.yml2
-rw-r--r--db/migrate/017_create_settings.rb6
-rw-r--r--test/unit/issue_test.rb2
-rw-r--r--test/unit/user_test.rb2
4 files changed, 6 insertions, 6 deletions
diff --git a/config/settings.yml b/config/settings.yml
index 6db94a50f..062b25d19 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -314,7 +314,7 @@ jsonp_enabled:
default: 0
security_notifications: 1
default_notification_option:
- default: 'only_my_events'
+ default: 'only_assigned'
emails_header:
default: ''
thumbnails_enabled:
diff --git a/db/migrate/017_create_settings.rb b/db/migrate/017_create_settings.rb
index 4c18329cc..5768ca24c 100644
--- a/db/migrate/017_create_settings.rb
+++ b/db/migrate/017_create_settings.rb
@@ -5,9 +5,9 @@ class CreateSettings < ActiveRecord::Migration[4.2]
t.column "value", :text
end
- # Persist text_formatting default setting for new installations
- setting = Setting.new(:name => "text_formatting", :value => Setting.text_formatting)
- setting.save!
+ # Persist default settings for new installations
+ Setting.create!(name: 'default_notification_option', value: Setting.default_notification_option)
+ Setting.create!(name: 'text_formatting', value: Setting.text_formatting)
end
def self.down
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index 14124f7bd..3957a7a60 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -3017,7 +3017,7 @@ class IssueTest < ActiveSupport::TestCase
end
test "Issue#recipients should include the author if the author is active" do
- issue = Issue.generate!(:author => User.generate!)
+ issue = Issue.generate!(:author => User.generate!(:mail_notification => 'only_my_events'))
assert issue.author, "No author set for Issue"
assert issue.recipients.include?(issue.author.mail)
end
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 823365842..e89381a68 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -192,7 +192,7 @@ class UserTest < ActiveSupport::TestCase
def test_user_before_create_should_set_the_mail_notification_to_the_default_setting
user1 = User.generate!
- assert_equal 'only_my_events', user1.mail_notification
+ assert_equal 'only_assigned', user1.mail_notification
with_settings :default_notification_option => 'all' do
user2 = User.generate!
assert_equal 'all', user2.mail_notification