diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-26 15:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-26 15:09:48 +0300 |
commit | 142890d5bbefa7b1e1b30f263f9ad67d9d496d29 (patch) | |
tree | 2c4de4059aba586f3204f983f17757dbf1643b6c /spec/policies | |
parent | bbede1e22c4dd615042a3e9c0d7e24afc83ca377 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/user_policy_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/policies/user_policy_spec.rb b/spec/policies/user_policy_spec.rb index 17ac7d0e44d..78212f06526 100644 --- a/spec/policies/user_policy_spec.rb +++ b/spec/policies/user_policy_spec.rb @@ -160,4 +160,16 @@ RSpec.describe UserPolicy do it { is_expected.not_to be_allowed(:read_group_count) } end end + + describe ':read_user_profile' do + context 'when the user is unconfirmed' do + let(:user) { create(:user, :unconfirmed) } + + it { is_expected.not_to be_allowed(:read_user_profile) } + end + + context 'when the user is confirmed' do + it { is_expected.to be_allowed(:read_user_profile) } + end + end end |