Add tests for richtext table classes
This commit is contained in:
parent
0bdc865d9f
commit
5d39bf8491
1 changed files with 10 additions and 0 deletions
|
@ -47,6 +47,11 @@ class RichTextTest < ActiveSupport::TestCase
|
||||||
assert_select "style", false
|
assert_select "style", false
|
||||||
assert_select "p", /^foo *baz$/
|
assert_select "p", /^foo *baz$/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
r = RichText.new("html", "<table><tr><td>column</td></tr></table>")
|
||||||
|
assert_html r do
|
||||||
|
assert_select "table[class='table table-sm w-auto']"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_html_to_text
|
def test_html_to_text
|
||||||
|
@ -145,6 +150,11 @@ class RichTextTest < ActiveSupport::TestCase
|
||||||
assert_html r do
|
assert_html r do
|
||||||
assert_select "pre", /^\s*foo bar baz\s*$/
|
assert_select "pre", /^\s*foo bar baz\s*$/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
r = RichText.new("markdown", "|column|column")
|
||||||
|
assert_html r do
|
||||||
|
assert_select "table[class='table table-sm w-auto']"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_markdown_to_text
|
def test_markdown_to_text
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue