mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:34:28 +08:00
restore the 'incoming_email_prefer_html' site setting
This commit is contained in:
@ -174,6 +174,18 @@ describe Email::Receiver do
|
||||
expect(topic.posts.last.raw).to eq("This is the *text* part.")
|
||||
end
|
||||
|
||||
it "prefers html over text when site setting is enabled" do
|
||||
SiteSetting.incoming_email_prefer_html = true
|
||||
expect { process(:text_and_html_reply) }.to change { topic.posts.count }
|
||||
expect(topic.posts.last.raw).to eq('This is the **html** part.')
|
||||
end
|
||||
|
||||
it "uses text when prefer_html site setting is enabled but no html is available" do
|
||||
SiteSetting.incoming_email_prefer_html = true
|
||||
expect { process(:text_reply) }.to change { topic.posts.count }
|
||||
expect(topic.posts.last.raw).to eq("This is a text reply :)")
|
||||
end
|
||||
|
||||
it "removes the 'on <date>, <contact> wrote' quoting line" do
|
||||
expect { process(:on_date_contact_wrote) }.to change { topic.posts.count }
|
||||
expect(topic.posts.last.raw).to eq("This is the actual reply.")
|
||||
|
Reference in New Issue
Block a user