diff options
Diffstat (limited to 'spec/support/group_access_helper.rb')
-rw-r--r-- | spec/support/group_access_helper.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/spec/support/group_access_helper.rb b/spec/support/group_access_helper.rb deleted file mode 100644 index c8ed0e406a1..00000000000 --- a/spec/support/group_access_helper.rb +++ /dev/null @@ -1,21 +0,0 @@ -module GroupAccessHelper - def group(visibility_level=0) - @group ||= create(:group, visibility_level: visibility_level) - end - - def project_group_member(access_level) - project = create(:project, visibility_level: group.visibility_level, group: group, name: 'B', path: 'B') - - create(:user).tap { |user| project.team.add_user(user, Gitlab::Access::DEVELOPER) } - end - - def group_member(access_level, grp=group()) - level = Object.const_get("Gitlab::Access::#{access_level.upcase}") - - create(:user).tap { |user| grp.add_user(user, level) } - end - - def external_guest(grp=group()) - create(:user, external: true).tap { |user| grp.add_user(user, Gitlab::Access::GUEST) } - end -end |