summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-03-20 21:03:53 +0100
committerDouwe Maan <douwe@selenight.nl>2016-03-20 21:04:07 +0100
commit8db1292139cfdac4c29c03b876b68b9e752cf75a (patch)
tree2fcf67ada482ecf4ac90f39c858334a62b709618 /spec/support
parent2eb19ea3ea36916bbea72a8ccab3e6d15f602ac9 (diff)
downloadgitlab-ce-8db1292139cfdac4c29c03b876b68b9e752cf75a.tar.gz
Tweaks, refactoring, and specs
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/group_access_helper.rb21
-rw-r--r--spec/support/matchers/access_matchers.rb2
2 files changed, 1 insertions, 22 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
diff --git a/spec/support/matchers/access_matchers.rb b/spec/support/matchers/access_matchers.rb
index 4e007c777e3..0497e391860 100644
--- a/spec/support/matchers/access_matchers.rb
+++ b/spec/support/matchers/access_matchers.rb
@@ -28,7 +28,7 @@ module AccessMatchers
if user.kind_of?(User)
# User#inspect displays too much information for RSpec's description
# messages
- "be #{type} for supplied User"
+ "be #{type} for the specified user"
else
"be #{type} for #{user}"
end