diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:08:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:08:22 +0000 |
commit | 123c68a7cf788ace140e57e478a12c5b7ac893ae (patch) | |
tree | b36e565ecd895ee46c1713f3734308cfce0e6ba9 /spec/features | |
parent | 862d225ca0d8eb452e56b8fe5a0109aac796e872 (diff) | |
download | gitlab-ce-123c68a7cf788ace140e57e478a12c5b7ac893ae.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/users/show_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/features/users/show_spec.rb b/spec/features/users/show_spec.rb index 932c1d8d4bd..8c2b555305a 100644 --- a/spec/features/users/show_spec.rb +++ b/spec/features/users/show_spec.rb @@ -59,6 +59,42 @@ describe 'User page' do end end + context 'with blocked profile' do + let(:user) { create(:user, state: :blocked) } + + it 'shows no tab' do + visit(user_path(user)) + + expect(page).to have_css("div.profile-header") + expect(page).not_to have_css("ul.nav-links") + end + + it 'shows blocked message' do + visit(user_path(user)) + + expect(page).to have_content("This user is blocked") + end + + it 'shows user name as blocked' do + visit(user_path(user)) + + expect(page).to have_css(".cover-title", text: 'Blocked user') + end + + it 'shows no additional fields' do + visit(user_path(user)) + + expect(page).not_to have_css(".profile-user-bio") + expect(page).not_to have_css(".profile-link-holder") + end + + it 'shows username' do + visit(user_path(user)) + + expect(page).to have_content("@#{user.username}") + end + end + it 'shows the status if there was one' do create(:user_status, user: user, message: "Working hard!") |