FIX: Email attachments with a size of 0 bytes caused error

This commit is contained in:
Gerhard Schlager
2020-02-03 18:21:22 +01:00
parent 67d5ce8ed1
commit e84d88ddea
3 changed files with 62 additions and 1 deletions

View File

@ -597,6 +597,14 @@ describe Email::Receiver do
MD
end
it "works with removed attachments" do
SiteSetting.authorized_extensions = "jpg"
expect { process(:removed_attachments) }.to change { topic.posts.count }
post = topic.posts.last
expect(post.uploads).to be_empty
end
it "supports eml attachments" do
SiteSetting.authorized_extensions = "eml"
expect { process(:attached_eml_file) }.to change { topic.posts.count }