Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-03-01 18:22:29 +0300
committerFelipe Artur <felipefac@gmail.com>2016-03-10 16:38:36 +0300
commitf2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d (patch)
tree84e668890ee51355f7ac9275012fbee3e295f5c4 /spec/helpers/visibility_level_helper_spec.rb
parent60ddd5ef34686e1ea9edc82a6915a9e4738bee50 (diff)
Add permission level to groups
Diffstat (limited to 'spec/helpers/visibility_level_helper_spec.rb')
-rw-r--r--spec/helpers/visibility_level_helper_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/helpers/visibility_level_helper_spec.rb b/spec/helpers/visibility_level_helper_spec.rb
index cd7596a763d..ef60ef75fbe 100644
--- a/spec/helpers/visibility_level_helper_spec.rb
+++ b/spec/helpers/visibility_level_helper_spec.rb
@@ -8,6 +8,7 @@ describe VisibilityLevelHelper do
end
let(:project) { build(:project) }
+ let(:group) { build(:group) }
let(:personal_snippet) { build(:personal_snippet) }
let(:project_snippet) { build(:project_snippet) }
@@ -19,6 +20,13 @@ describe VisibilityLevelHelper do
end
end
+ context 'used with a Group' do
+ it 'delegates groups to #group_visibility_level_description' do
+ expect(visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, group))
+ .to match /group/i
+ end
+ end
+
context 'called with a Snippet' do
it 'delegates snippets to #snippet_visibility_level_description' do
expect(visibility_level_description(Gitlab::VisibilityLevel::INTERNAL, project_snippet))