Converted User#mail_notification from a boolean to a string.
The string will now store which type of notification option to use. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4216 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Vendored
+10
-10
@@ -12,7 +12,7 @@ users_004:
|
||||
firstname: Robert
|
||||
id: 4
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
mail_notification: all
|
||||
login: rhill
|
||||
type: User
|
||||
users_001:
|
||||
@@ -28,7 +28,7 @@ users_001:
|
||||
firstname: redMine
|
||||
id: 1
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
mail_notification: all
|
||||
login: admin
|
||||
type: User
|
||||
users_002:
|
||||
@@ -44,7 +44,7 @@ users_002:
|
||||
firstname: John
|
||||
id: 2
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
mail_notification: all
|
||||
login: jsmith
|
||||
type: User
|
||||
users_003:
|
||||
@@ -60,7 +60,7 @@ users_003:
|
||||
firstname: Dave
|
||||
id: 3
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
mail_notification: all
|
||||
login: dlopper
|
||||
type: User
|
||||
users_005:
|
||||
@@ -77,7 +77,7 @@ users_005:
|
||||
lastname: Lopper2
|
||||
firstname: Dave2
|
||||
auth_source_id:
|
||||
mail_notification: true
|
||||
mail_notification: all
|
||||
login: dlopper2
|
||||
type: User
|
||||
users_006:
|
||||
@@ -93,7 +93,7 @@ users_006:
|
||||
lastname: Anonymous
|
||||
firstname: ''
|
||||
auth_source_id:
|
||||
mail_notification: false
|
||||
mail_notification: only_my_events
|
||||
login: ''
|
||||
type: AnonymousUser
|
||||
users_007:
|
||||
@@ -109,7 +109,7 @@ users_007:
|
||||
lastname: One
|
||||
firstname: Some
|
||||
auth_source_id:
|
||||
mail_notification: false
|
||||
mail_notification: only_my_events
|
||||
login: someone
|
||||
type: User
|
||||
users_008:
|
||||
@@ -125,7 +125,7 @@ users_008:
|
||||
lastname: Misc
|
||||
firstname: User
|
||||
auth_source_id:
|
||||
mail_notification: false
|
||||
mail_notification: only_my_events
|
||||
login: miscuser8
|
||||
type: User
|
||||
users_009:
|
||||
@@ -141,7 +141,7 @@ users_009:
|
||||
lastname: Misc
|
||||
firstname: User
|
||||
auth_source_id:
|
||||
mail_notification: false
|
||||
mail_notification: only_my_events
|
||||
login: miscuser9
|
||||
type: User
|
||||
groups_010:
|
||||
@@ -153,4 +153,4 @@ groups_011:
|
||||
lastname: B Team
|
||||
type: Group
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ class UserTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
def test_mail_notification_all
|
||||
@jsmith.mail_notification = true
|
||||
@jsmith.mail_notification = 'all'
|
||||
@jsmith.notified_project_ids = []
|
||||
@jsmith.save
|
||||
@jsmith.reload
|
||||
@@ -293,15 +293,15 @@ class UserTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
def test_mail_notification_selected
|
||||
@jsmith.mail_notification = false
|
||||
@jsmith.mail_notification = 'selected'
|
||||
@jsmith.notified_project_ids = [1]
|
||||
@jsmith.save
|
||||
@jsmith.reload
|
||||
assert Project.find(1).recipients.include?(@jsmith.mail)
|
||||
end
|
||||
|
||||
def test_mail_notification_none
|
||||
@jsmith.mail_notification = false
|
||||
def test_mail_notification_only_my_events
|
||||
@jsmith.mail_notification = 'only_my_events'
|
||||
@jsmith.notified_project_ids = []
|
||||
@jsmith.save
|
||||
@jsmith.reload
|
||||
|
||||
Reference in New Issue
Block a user