]> source.dussan.org Git - redmine.git/commitdiff
Revert r22504 that missing a necessary file (#39500).
authorGo MAEDA <maeda@farend.jp>
Mon, 11 Dec 2023 09:14:47 +0000 (09:14 +0000)
committerGo MAEDA <maeda@farend.jp>
Mon, 11 Dec 2023 09:14:47 +0000 (09:14 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22511 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/settings.yml
db/migrate/017_create_settings.rb
test/unit/issue_test.rb
test/unit/user_test.rb

index 062b25d1939975bf3f53768d2292fb3911b3a5b0..6db94a50f91b7611376be926896f748285d5fb5a 100644 (file)
@@ -314,7 +314,7 @@ jsonp_enabled:
   default: 0
   security_notifications: 1
 default_notification_option:
-  default: 'only_assigned'
+  default: 'only_my_events'
 emails_header:
   default: ''
 thumbnails_enabled:
index 5768ca24c0fcedce3b1b7e6e3d80beacd7686794..4c18329cc9dd090abe95ae15528b726d0cd0ce59 100644 (file)
@@ -5,9 +5,9 @@ class CreateSettings < ActiveRecord::Migration[4.2]
       t.column "value", :text
     end
 
-    # 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)
+    # Persist text_formatting default setting for new installations
+    setting = Setting.new(:name => "text_formatting", :value => Setting.text_formatting)
+    setting.save!
   end
 
   def self.down
index 3957a7a6000f738fb297a24fde611208423c99c7..14124f7bdc2e24c73228efc7f29c9c4a8668ec26 100644 (file)
@@ -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!(:mail_notification => 'only_my_events'))
+    issue = Issue.generate!(:author => User.generate!)
     assert issue.author, "No author set for Issue"
     assert issue.recipients.include?(issue.author.mail)
   end
index e89381a680e68de1a3ddcc355e8b374313615e87..8233658420f4b2d050bc4332cd91384c460f183a 100644 (file)
@@ -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_assigned', user1.mail_notification
+    assert_equal 'only_my_events', user1.mail_notification
     with_settings :default_notification_option => 'all' do
       user2 = User.generate!
       assert_equal 'all', user2.mail_notification