Commit ddb0344a authored by Wei-Meng Lee's avatar Wei-Meng Lee Committed by Wei-Meng Lee

Apply reviewer suggestions

parent ddd6f804
...@@ -88,7 +88,7 @@ class Notify < BaseMailer ...@@ -88,7 +88,7 @@ class Notify < BaseMailer
# Return group-specific email address if present, otherwise return global # Return group-specific email address if present, otherwise return global
# email address # email address
group_notification_email.presence || @current_user.notification_email group_notification_email || @current_user.notification_email
end end
# Formats arguments into a String suitable for use as an email subject # Formats arguments into a String suitable for use as an email subject
......
...@@ -23,7 +23,7 @@ Each of these settings have levels of notification: ...@@ -23,7 +23,7 @@ Each of these settings have levels of notification:
- Disabled: Turns off notifications. - Disabled: Turns off notifications.
- Custom: Receive notifications for custom selected events. - Custom: Receive notifications for custom selected events.
> Introduced in GitLab 11.9 > Introduced in GitLab 12.0
You can also select an email address to receive notifications for each group you belong to. You can also select an email address to receive notifications for each group you belong to.
......
...@@ -60,10 +60,9 @@ shared_examples 'an email sent to a user' do ...@@ -60,10 +60,9 @@ shared_examples 'an email sent to a user' do
end end
end end
context 'when project is in a sub-group' do context 'when project is in a sub-group', :nested_groups do
before do before do
project.group = subgroup project.update!(group: subgroup)
project.save!
end end
it 'is sent to user\'s subgroup notification email address when set' do it 'is sent to user\'s subgroup notification email address when set' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment