24 lines
463 B
Ruby
24 lines
463 B
Ruby
require "test_helper"
|
|
|
|
class MailerHelperTest < ActionView::TestCase
|
|
test "htmlify_email adds correct tags" do
|
|
input = <<~TEST.chomp
|
|
One line here.
|
|
|
|
Another one here.
|
|
The same paragraph.
|
|
|
|
And another.
|
|
TEST
|
|
expected_output = <<~TEST.chomp
|
|
<p>One line here.</p>
|
|
|
|
<p>Another one here.
|
|
The same paragraph.</p>
|
|
|
|
<p>And another.</p>
|
|
TEST
|
|
assert_equal expected_output, htmlify_email(input)
|
|
end
|
|
end
|