Commit b90db6bf authored by Jarka Košanová's avatar Jarka Košanová

Merge branch 'fix-job-title-validation' into 'master'

Remove presence validation of job title

See merge request gitlab-org/gitlab!26421
parents 3d5dbd85 c2bdc3e0
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
class UserDetail < ApplicationRecord class UserDetail < ApplicationRecord
belongs_to :user belongs_to :user
validates :job_title, presence: true, length: { maximum: 200 } validates :job_title, length: { maximum: 200 }
end end
...@@ -7,7 +7,7 @@ describe UserDetail do ...@@ -7,7 +7,7 @@ describe UserDetail do
describe 'validations' do describe 'validations' do
describe 'job_title' do describe 'job_title' do
it { is_expected.to validate_presence_of(:job_title) } it { is_expected.not_to validate_presence_of(:job_title) }
it { is_expected.to validate_length_of(:job_title).is_at_most(200) } it { is_expected.to validate_length_of(:job_title).is_at_most(200) }
end end
end end
......
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