mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Code and Emoticon formatting in HTML emails.
This commit is contained in:
@@ -30,7 +30,7 @@ describe Email::Styles do
|
||||
end
|
||||
|
||||
it "adds a width and height to images with an emoji path" do
|
||||
frag = basic_fragment("<img src='/assets/emoji/fish.png'>")
|
||||
frag = basic_fragment("<img src='/plugins/emoji/fish.png' class='emoji'>")
|
||||
expect(frag.at("img")["width"]).to eq("20")
|
||||
expect(frag.at("img")["height"]).to eq("20")
|
||||
end
|
||||
@@ -85,12 +85,6 @@ describe Email::Styles do
|
||||
expect(frag.at('li')['style']).to be_present
|
||||
end
|
||||
|
||||
it "removes pre tags but keeps their contents" do
|
||||
style = Email::Styles.new("<pre>hello</pre>")
|
||||
style.format_basic
|
||||
style.format_html
|
||||
expect(style.to_html).to eq("hello")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,15 @@ describe UserNotifications do
|
||||
its(:to) { should == [user.email] }
|
||||
its(:subject) { should be_present }
|
||||
its(:from) { should == [SiteSetting.notification_email] }
|
||||
its(:body) { should be_present }
|
||||
|
||||
it 'should have a html body' do
|
||||
subject.html_part.body.to_s.should be_present
|
||||
end
|
||||
|
||||
it 'should have a text body' do
|
||||
subject.html_part.body.to_s.should be_present
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user