提交 6e6e8abe 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #25562 from vipulnsward/select-html-options-test

Add coverage for #25529
......@@ -738,7 +738,7 @@ def test_select_with_prompt_and_blank
)
end
def test_empty
def test_select_with_empty
@post = Post.new
@post.category = ""
assert_dom_equal(
......@@ -747,6 +747,15 @@ def test_empty
)
end
def test_select_with_html_options
@post = Post.new
@post.category = ""
assert_dom_equal(
"<select class=\"disabled\" disabled=\"disabled\" name=\"post[category]\" id=\"post_category\"><option value=\"\">Please select</option>\n<option value=\"\"></option>\n</select>",
select("post", "category", [], { prompt: true, include_blank: true }, { class: 'disabled', disabled: true })
)
end
def test_select_with_nil
@post = Post.new
@post.category = "othervalue"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册