tabletop-companion/test/helpers/mailer_helper_test.rb

26 lines
494 B
Ruby

# frozen_string_literal: true
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