Apply reviewer suggestions

This commit is contained in:
Wei-Meng Lee 2019-05-31 10:31:28 +00:00 committed by Wei-Meng Lee
parent ddd6f80457
commit ddb0344a8f
3 changed files with 4 additions and 5 deletions

View File

@ -88,7 +88,7 @@ class Notify < BaseMailer
# Return group-specific email address if present, otherwise return global
# email address
group_notification_email.presence || @current_user.notification_email
group_notification_email || @current_user.notification_email
end
# Formats arguments into a String suitable for use as an email subject

View File

@ -23,7 +23,7 @@ Each of these settings have levels of notification:
- Disabled: Turns off notifications.
- 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.

View File

@ -60,10 +60,9 @@ shared_examples 'an email sent to a user' do
end
end
context 'when project is in a sub-group' do
context 'when project is in a sub-group', :nested_groups do
before do
project.group = subgroup
project.save!
project.update!(group: subgroup)
end
it 'is sent to user\'s subgroup notification email address when set' do