summaryrefslogtreecommitdiff
path: root/spec/mailers
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2016-08-02 20:37:22 +0200
committerAdam Niedzielski <adamsunday@gmail.com>2016-08-02 20:37:22 +0200
commitb2c8dc6f35ceb08e23422a356831070b5136809d (patch)
tree248fd3b5723e8fc2a8d19c05f1bce272a8e80cfc /spec/mailers
parent420e59030b151a5634e31beaa1d80f1eac079295 (diff)
downloadgitlab-ce-b2c8dc6f35ceb08e23422a356831070b5136809d.tar.gz
Replace optional parameters with keyword arguments.
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notify_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 3685b2b17b5..828d2845988 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -493,7 +493,12 @@ describe Notify do
end
def invite_to_project(project:, email:, inviter:)
- ProjectMember.add_user(project.project_members, 'toto@example.com', Gitlab::Access::DEVELOPER, inviter)
+ Member.add_user(
+ project.project_members,
+ 'toto@example.com',
+ Gitlab::Access::DEVELOPER,
+ current_user: inviter
+ )
project.project_members.invite.last
end
@@ -740,7 +745,12 @@ describe Notify do
end
def invite_to_group(group:, email:, inviter:)
- GroupMember.add_user(group.group_members, 'toto@example.com', Gitlab::Access::DEVELOPER, inviter)
+ Member.add_user(
+ group.group_members,
+ 'toto@example.com',
+ Gitlab::Access::DEVELOPER,
+ current_user: inviter
+ )
group.group_members.invite.last
end