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
74ad49e4
Commit
74ad49e4
authored
Sep 03, 2021
by
Manoj M J
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Validate user website_url"
This reverts commit
ad4dbad7
.
parent
d98c7844
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
15 deletions
+2
-15
app/models/user.rb
app/models/user.rb
+0
-2
spec/features/profiles/user_edit_profile_spec.rb
spec/features/profiles/user_edit_profile_spec.rb
+2
-13
No files found.
app/models/user.rb
View file @
74ad49e4
...
...
@@ -253,8 +253,6 @@ class User < ApplicationRecord
validates
:color_scheme_id
,
allow_nil:
true
,
inclusion:
{
in:
Gitlab
::
ColorSchemes
.
valid_ids
,
message:
_
(
"%{placeholder} is not a valid color scheme"
)
%
{
placeholder:
'%{value}'
}
}
validates
:website_url
,
allow_blank:
true
,
url:
true
before_validation
:sanitize_attrs
before_validation
:reset_secondary_emails
,
if: :email_changed?
before_save
:default_private_profile_to_false
...
...
spec/features/profiles/user_edit_profile_spec.rb
View file @
74ad49e4
...
...
@@ -32,7 +32,7 @@ RSpec.describe 'User edit profile' do
fill_in
'user_skype'
,
with:
'testskype'
fill_in
'user_linkedin'
,
with:
'testlinkedin'
fill_in
'user_twitter'
,
with:
'testtwitter'
fill_in
'user_website_url'
,
with:
'
http://testurl.com
'
fill_in
'user_website_url'
,
with:
'
testurl
'
fill_in
'user_location'
,
with:
'Ukraine'
fill_in
'user_bio'
,
with:
'I <3 GitLab :tada:'
fill_in
'user_job_title'
,
with:
'Frontend Engineer'
...
...
@@ -43,7 +43,7 @@ RSpec.describe 'User edit profile' do
skype:
'testskype'
,
linkedin:
'testlinkedin'
,
twitter:
'testtwitter'
,
website_url:
'
http://testurl.com
'
,
website_url:
'
testurl
'
,
bio:
'I <3 GitLab :tada:'
,
bio_html:
'<p data-sourcepos="1:1-1:18" dir="auto">I <3 GitLab <gl-emoji title="party popper" data-name="tada" data-unicode-version="6.0">🎉</gl-emoji></p>'
,
job_title:
'Frontend Engineer'
,
...
...
@@ -65,17 +65,6 @@ RSpec.describe 'User edit profile' do
end
end
it
'shows an error if the website url is not valid'
do
fill_in
'user_website_url'
,
with:
'admin@gitlab.com'
submit_settings
expect
(
user
.
reload
).
to
have_attributes
(
website_url:
''
)
expect
(
page
).
to
have_content
(
'Website url is not a valid URL'
)
end
describe
'when I change my email'
do
before
do
user
.
send_reset_password_instructions
...
...
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