summaryrefslogtreecommitdiff
path: root/spec/support/helpers/notification_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/notification_helpers.rb')
-rw-r--r--spec/support/helpers/notification_helpers.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/support/helpers/notification_helpers.rb b/spec/support/helpers/notification_helpers.rb
index 8d84510fb73..44c2051598c 100644
--- a/spec/support/helpers/notification_helpers.rb
+++ b/spec/support/helpers/notification_helpers.rb
@@ -17,11 +17,15 @@ module NotificationHelpers
def create_user_with_notification(level, username, resource = project)
user = create(:user, username: username)
+ create_notification_setting(user, resource, level)
+
+ user
+ end
+
+ def create_notification_setting(user, resource, level)
setting = user.notification_settings_for(resource)
setting.level = level
setting.save
-
- user
end
# Create custom notifications