]> git.openstreetmap.org Git - rails.git/blobdiff - test/lib/rich_text_test.rb
Added missing dependency for fedora install
[rails.git] / test / lib / rich_text_test.rb
index 5b590bc3e41ae1a60253884ff1154622af7c436e..fc9355717565018f02612962663fbd7eb6c5cd4d 100644 (file)
@@ -58,6 +58,12 @@ class RichTextTest < ActiveSupport::TestCase
       assert_select "p[class='btn btn-warning']", false
       assert_select "p", /^Click Me$/
     end
       assert_select "p[class='btn btn-warning']", false
       assert_select "p", /^Click Me$/
     end
+
+    r = RichText.new("html", "<p style='color:red'>Danger</p>")
+    assert_html r do
+      assert_select "p[style='color:red']", false
+      assert_select "p", /^Danger$/
+    end
   end
 
   def test_html_to_text
   end
 
   def test_html_to_text
@@ -163,11 +169,16 @@ class RichTextTest < ActiveSupport::TestCase
     end
 
     r = RichText.new("markdown", "Click Me\n{:.btn.btn-warning}")
     end
 
     r = RichText.new("markdown", "Click Me\n{:.btn.btn-warning}")
-    # raise r.to_html
     assert_html r do
       assert_select "p[class='btn btn-warning']", false
       assert_select "p", /^Click Me$/
     end
     assert_html r do
       assert_select "p[class='btn btn-warning']", false
       assert_select "p", /^Click Me$/
     end
+
+    r = RichText.new("markdown", "<p style='color:red'>Danger</p>")
+    assert_html r do
+      assert_select "p[style='color:red']", false
+      assert_select "p", /^Danger$/
+    end
   end
 
   def test_markdown_to_text
   end
 
   def test_markdown_to_text