2024-02-25 12:15:55 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-14 15:22:10 -05:00
|
|
|
require "test_helper"
|
|
|
|
|
|
|
|
class ApplicationHelperTest < ActionView::TestCase
|
|
|
|
context "The application helper" do
|
|
|
|
context "format_text method" do
|
|
|
|
should "not raise an exception for invalid DText" do
|
2023-04-09 09:50:43 -04:00
|
|
|
dtext = "a\x00b"
|
2018-01-14 15:22:10 -05:00
|
|
|
|
|
|
|
assert_nothing_raised { format_text(dtext) }
|
2022-04-05 12:50:34 -04:00
|
|
|
assert_equal('<div class="styled-dtext"></div>', format_text(dtext))
|
2018-01-14 15:22:10 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|