From 4aceca44f976f4c30ad074752b7f426703e64d5c Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Tue, 25 Mar 2025 05:36:00 +0300 Subject: [PATCH] Split RichText text-to-html test --- test/lib/rich_text_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lib/rich_text_test.rb b/test/lib/rich_text_test.rb index 63c70b099..d454c4728 100644 --- a/test/lib/rich_text_test.rb +++ b/test/lib/rich_text_test.rb @@ -221,19 +221,23 @@ class RichTextTest < ActiveSupport::TestCase assert_equal 50, r.spam_score.round end - def test_text_to_html + def test_text_to_html_linkify r = RichText.new("text", "foo http://example.com/ bar") assert_html r do assert_select "a", 1 assert_select "a[href='http://example.com/']", 1 assert_select "a[rel='nofollow noopener noreferrer']", 1 end + end + def test_text_to_html_email r = RichText.new("text", "foo example@example.com bar") assert_html r do assert_select "a", 0 end + end + def test_text_to_html_escape r = RichText.new("text", "foo < bar & baz > qux") assert_html r do assert_select "p", "foo < bar & baz > qux" -- 2.39.5