Simplify basic presence validations (#29664)
This commit is contained in:
parent
bc435c63bd
commit
5acec087ca
16 changed files with 28 additions and 159 deletions
|
@ -257,12 +257,7 @@ RSpec.describe MediaAttachment, :attachment_processing do
|
|||
end
|
||||
end
|
||||
|
||||
it 'is invalid without file' do
|
||||
media = described_class.new
|
||||
|
||||
expect(media.valid?).to be false
|
||||
expect(media).to model_have_error_on_field(:file)
|
||||
end
|
||||
it { is_expected.to validate_presence_of(:file) }
|
||||
|
||||
describe 'size limit validation' do
|
||||
it 'rejects video files that are too large' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue