]> git.openstreetmap.org Git - rails.git/blobdiff - test/lib/rich_text_test.rb
Detect <img> images in markdown rich text
[rails.git] / test / lib / rich_text_test.rb
index 8dc9e49b1180582535d0939b67fdd3ede88219be..8c12053179d2389b7575506905c49d453ef89075 100644 (file)
@@ -275,6 +275,11 @@ class RichTextTest < ActiveSupport::TestCase
     assert_equal "https://example.com/image1.jpg", r.image
   end
 
+  def test_markdown_html_image
+    r = RichText.new("markdown", "<img src='https://example.com/img_element.png'>")
+    assert_equal "https://example.com/img_element.png", r.image
+  end
+
   private
 
   def assert_html(richtext, &block)