Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
54f891a1
Commit
54f891a1
authored
Dec 09, 2021
by
Phil Hughes
Committed by
Kushal Pandya
Dec 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes user profile 500 error
parent
7e5c3d65
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
app/views/users/_overview.html.haml
app/views/users/_overview.html.haml
+1
-1
spec/features/profiles/user_visits_profile_spec.rb
spec/features/profiles/user_visits_profile_spec.rb
+18
-0
No files found.
app/views/users/_overview.html.haml
View file @
54f891a1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
%a
.js-retry-load
{
href:
'#'
}
%a
.js-retry-load
{
href:
'#'
}
=
s_
(
'UserProfile|Retry'
)
=
s_
(
'UserProfile|Retry'
)
.user-calendar-activities
.user-calendar-activities
-
if
@user
.
user_readme
-
if
@user
.
user_readme
&
.
rich_viewer
.row.justify-content-center
.row.justify-content-center
.col-12.col-md-10.col-lg-8.gl-my-6
.col-12.col-md-10.col-lg-8.gl-my-6
.gl-display-flex
.gl-display-flex
...
...
spec/features/profiles/user_visits_profile_spec.rb
View file @
54f891a1
...
@@ -29,6 +29,24 @@ RSpec.describe 'User visits their profile' do
...
@@ -29,6 +29,24 @@ RSpec.describe 'User visits their profile' do
expect
(
find
(
'.file-content'
)).
to
have_content
(
'testme'
)
expect
(
find
(
'.file-content'
)).
to
have_content
(
'testme'
)
end
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
context
'when user has groups'
do
let
(
:group
)
do
let
(
:group
)
do
create
:group
do
|
group
|
create
:group
do
|
group
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment