+ def test_markdown_html_image_with_empty_src
+ r = RichText.new("markdown", "<img src=''>")
+ assert_nil r.image
+ end
+
+ def test_markdown_skip_html_image_with_empty_src
+ r = RichText.new("markdown", "<img src=''> <img src='https://example.com/next_img_element.png'>")
+ assert_equal "https://example.com/next_img_element.png", r.image
+ end
+
+ def test_markdown_html_image_without_src
+ r = RichText.new("markdown", "<img>")
+ assert_nil r.image
+ end
+
+ def test_markdown_skip_html_image_without_src
+ r = RichText.new("markdown", "<img> <img src='https://example.com/next_img_element.png'>")
+ assert_equal "https://example.com/next_img_element.png", r.image
+ end
+