diff options
author | JX Terry <jxterry@protonmail.com> | 2018-07-24 12:46:19 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-24 12:46:19 +0000 |
commit | 99011a61cf4136c806e7de43fcd55475d2407fa1 (patch) | |
tree | 99486b31dc0df1b86db0bb11ec32b05c9bc1fb2d /spec/helpers/users_helper_spec.rb | |
parent | adc327d3fa72b9f5b9c42c629c99f0a89ca15192 (diff) | |
download | gitlab-ce-99011a61cf4136c806e7de43fcd55475d2407fa1.tar.gz |
Add an option to have a private profile on GitLab
Diffstat (limited to 'spec/helpers/users_helper_spec.rb')
-rw-r--r-- | spec/helpers/users_helper_spec.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb index b18c045848f..b079802cb81 100644 --- a/spec/helpers/users_helper_spec.rb +++ b/spec/helpers/users_helper_spec.rb @@ -25,8 +25,20 @@ describe UsersHelper do allow(helper).to receive(:can?).and_return(true) end - it 'includes all the expected tabs' do - expect(tabs).to include(:activity, :groups, :contributed, :projects, :snippets) + context 'with public profile' do + it 'includes all the expected tabs' do + expect(tabs).to include(:activity, :groups, :contributed, :projects, :snippets) + end + end + + context 'with private profile' do + before do + allow(helper).to receive(:can?).with(user, :read_user_profile, nil).and_return(false) + end + + it 'is empty' do + expect(tabs).to be_empty + end end end |