about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/glitch/keyword_mute_helper_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/glitch/keyword_mute_helper_spec.rb b/spec/models/glitch/keyword_mute_helper_spec.rb
index 9d09e58da..b3f991d5b 100644
--- a/spec/models/glitch/keyword_mute_helper_spec.rb
+++ b/spec/models/glitch/keyword_mute_helper_spec.rb
@@ -39,5 +39,12 @@ RSpec.describe Glitch::KeywordMuteHelper do
 
       expect(helper.matches?(status)).to be true
     end
+
+    it 'matches link hrefs in HTML text' do
+      status = Fabricate(:status, text: '<p><a href="https://example.com/it-was-milk">yep</a></p>')
+      Glitch::KeywordMute.create!(account: alice, keyword: 'milk')
+
+      expect(helper.matches?(status)).to be true
+    end
   end
 end