Commit 7614770a authored by Jarka Košanová's avatar Jarka Košanová

Merge branch 'validators-on' into 'master'

Use validators_on instead of _validators

See merge request gitlab-org/gitlab!26283
parents 2124068b 7b2946f6
......@@ -15,7 +15,7 @@ describe Avatarable do
end
describe '#update' do
let(:validator) { project._validators[:avatar].detect { |v| v.is_a?(FileSizeValidator) } }
let(:validator) { project.class.validators_on(:avatar).find { |v| v.is_a?(FileSizeValidator) } }
context 'when avatar changed' do
it 'validates the file size' do
......
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