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:
authorNick Thomas <nick@gitlab.com>2017-07-17 13:40:17 +0300
committerNick Thomas <nick@gitlab.com>2017-07-17 13:54:07 +0300
commitc9e6caaef4c467343d162c5841b5543940b092a1 (patch)
tree94b7183af17e1cddcce839517f62a5ed387b44df /spec/models/namespace_spec.rb
parent5f32bd774ad5cb89685dab5102e0614b2593d4ff (diff)
Promote visibility level helpers from Group to Namespace
In EE, we make use of `namespace#public?` in projects. When the project is in a personal namespace, this breaks as the `public?` helper isn't present.
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r--spec/models/namespace_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb
index 62c4ea01ce1..89ea5ceda95 100644
--- a/spec/models/namespace_spec.rb
+++ b/spec/models/namespace_spec.rb
@@ -63,6 +63,14 @@ describe Namespace, models: true do
it { is_expected.to respond_to(:has_parent?) }
end
+ describe 'inclusions' do
+ it { is_expected.to include_module(Gitlab::VisibilityLevel) }
+ end
+
+ describe '#visibility_level_field' do
+ it { expect(namespace.visibility_level_field).to eq(:visibility_level) }
+ end
+
describe '#to_param' do
it { expect(namespace.to_param).to eq(namespace.full_path) }
end