Add test for select option with empty string value
This commit is contained in:
parent
e26e1f10c0
commit
f8ccd418d3
1 changed files with 10 additions and 0 deletions
|
|
@ -80,6 +80,16 @@ o.spec("form inputs", function() {
|
|||
o(select.dom.selectedIndex).equals(0)
|
||||
})
|
||||
|
||||
o("select option can have empty string value", function() {
|
||||
var select = {tag: "select", children :[
|
||||
{tag: "option", attrs: {value: ""}, text: "aaa"}
|
||||
]}
|
||||
|
||||
render(root, [select])
|
||||
|
||||
o(select.dom.firstChild.value).equals("")
|
||||
})
|
||||
|
||||
o("select yields invalid value without children", function() {
|
||||
var select = {tag: "select", attrs: {value: "a"}}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue