From 4f0152a00e820a6baedf5f190c6983ffffd8acba Mon Sep 17 00:00:00 2001 From: Pablo Brasero Date: Fri, 21 Nov 2025 15:37:00 +0000 Subject: [PATCH] Add test for untested behaviour --- test/lib/spam_scorer_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/lib/spam_scorer_test.rb b/test/lib/spam_scorer_test.rb index f45c6de90..53c790cd4 100644 --- a/test/lib/spam_scorer_test.rb +++ b/test/lib/spam_scorer_test.rb @@ -26,4 +26,10 @@ class SpamScorerTest < ActiveSupport::TestCase scorer = SpamScorer.new_from_user(user) assert_equal 12, scorer.score end + + def test_spammy_phrases + r = RichText.new("markdown", "Business Description: totally legit beesknees. Additional Keywords: apiary joints") + scorer = SpamScorer.new_from_rich_text(r) + assert_equal 80, scorer.score.round + end end -- 2.39.5