Commit b9eeae21 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'mmj-revert-69436' into 'master'

Revert "Validate user website_url"

See merge request gitlab-org/gitlab!69532
parents 2d558d25 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
......
......@@ -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 &lt;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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment