mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Simplify basic presence validations (#29664)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user