diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-23 23:50:52 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-23 23:50:52 +0300 |
commit | c00f81d8a6f176464997b5a004ca2311e567763f (patch) | |
tree | a8d487ecd9ee499e28368806b13461664cd4366d /spec/lib/gitlab/visibility_level_spec.rb | |
parent | 1f3225a5e375b370e76c98e47e8ed0b8bc67eac8 (diff) | |
parent | b90f1098cf42889c32eb6f12779def005f15cbae (diff) |
Merge branch 'tc-refactor-projects-finder-init-collection' into 'master'
Add User#full_private_access? to check if user has access to all private groups & projects
Closes #31745
See merge request !12373
Diffstat (limited to 'spec/lib/gitlab/visibility_level_spec.rb')
-rw-r--r-- | spec/lib/gitlab/visibility_level_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/gitlab/visibility_level_spec.rb b/spec/lib/gitlab/visibility_level_spec.rb index 84d2484cc8a..db9d2807be6 100644 --- a/spec/lib/gitlab/visibility_level_spec.rb +++ b/spec/lib/gitlab/visibility_level_spec.rb @@ -21,7 +21,7 @@ describe Gitlab::VisibilityLevel, lib: true do describe '.levels_for_user' do it 'returns all levels for an admin' do - user = double(:user, admin?: true) + user = build(:user, :admin) expect(described_class.levels_for_user(user)) .to eq([Gitlab::VisibilityLevel::PRIVATE, @@ -30,7 +30,7 @@ describe Gitlab::VisibilityLevel, lib: true do end it 'returns INTERNAL and PUBLIC for internal users' do - user = double(:user, admin?: false, external?: false) + user = build(:user) expect(described_class.levels_for_user(user)) .to eq([Gitlab::VisibilityLevel::INTERNAL, @@ -38,7 +38,7 @@ describe Gitlab::VisibilityLevel, lib: true do end it 'returns PUBLIC for external users' do - user = double(:user, admin?: false, external?: true) + user = build(:user, :external) expect(described_class.levels_for_user(user)) .to eq([Gitlab::VisibilityLevel::PUBLIC]) |