mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 22:37:37 +08:00
FIX: properly handle attachments in received emails
This regressed in 1ac3e547 when we added support for eml attachments.
This commit is contained in:
@ -522,10 +522,14 @@ describe Email::Receiver do
|
||||
end
|
||||
|
||||
it "supports attachments" do
|
||||
SiteSetting.authorized_extensions = "txt"
|
||||
SiteSetting.authorized_extensions = "txt|jpg"
|
||||
expect { process(:attached_txt_file) }.to change { topic.posts.count }
|
||||
expect(topic.posts.last.raw).to match(/<a\sclass='attachment'[^>]*>text\.txt<\/a>/)
|
||||
expect(topic.posts.last.uploads.length).to eq 1
|
||||
|
||||
expect { process(:apple_mail_attachment) }.to change { topic.posts.count }
|
||||
expect(topic.posts.last.raw).to match /<img.+?src="\/uploads\/default\/original\//
|
||||
expect(topic.posts.last.uploads.length).to eq 1
|
||||
end
|
||||
|
||||
it "supports eml attachments" do
|
||||
|
Reference in New Issue
Block a user