From aee0a117a889461ce8ced6fcf73207fe017f1d99 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Dec 2021 13:37:47 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-6-stable-ee --- spec/features/profiles/user_visits_profile_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'spec/features/profiles/user_visits_profile_spec.rb') diff --git a/spec/features/profiles/user_visits_profile_spec.rb b/spec/features/profiles/user_visits_profile_spec.rb index 273d52996d3..d90ac439eee 100644 --- a/spec/features/profiles/user_visits_profile_spec.rb +++ b/spec/features/profiles/user_visits_profile_spec.rb @@ -29,6 +29,24 @@ RSpec.describe 'User visits their profile' do expect(find('.file-content')).to have_content('testme') end + it 'hides empty user readme' do + project = create(:project, :repository, :public, path: user.username, namespace: user.namespace) + + Files::UpdateService.new( + project, + user, + start_branch: 'master', + branch_name: 'master', + commit_message: 'Update feature', + file_path: 'README.md', + file_content: '' + ).execute + + visit(user_path(user)) + + expect(page).not_to have_selector('.file-content') + end + context 'when user has groups' do let(:group) do create :group do |group| -- cgit v1.2.3