diff options
Diffstat (limited to 'src/test/kotlin')
-rw-r--r-- | src/test/kotlin/test/pl/treksoft/kvision/form/CheckInputSpec.kt (renamed from src/test/kotlin/test/pl/treksoft/kvision/form/CheckBoxInputSpec.kt) | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/CheckBoxInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/CheckInputSpec.kt index efc6d78e..8991b710 100644 --- a/src/test/kotlin/test/pl/treksoft/kvision/form/CheckBoxInputSpec.kt +++ b/src/test/kotlin/test/pl/treksoft/kvision/form/CheckInputSpec.kt @@ -2,21 +2,19 @@ package test.pl.treksoft.kvision.form import pl.treksoft.kvision.core.Root import pl.treksoft.kvision.form.CHECKINPUTTYPE -import pl.treksoft.kvision.form.CheckBoxInput -import pl.treksoft.kvision.form.TEXTINPUTTYPE -import pl.treksoft.kvision.form.TextInput +import pl.treksoft.kvision.form.CheckInput import test.pl.treksoft.kvision.DomSpec import kotlin.browser.document import kotlin.test.Test import kotlin.test.assertEquals -class CheckBoxInputSpec : DomSpec { +class CheckInputSpec : DomSpec { @Test fun render() { run { val root = Root("test") - val ci = CheckBoxInput(value = true, name = "name", id = "idti", disabled = true) + val ci = CheckInput(value = true, name = "name", id = "idti", disabled = true) root.add(ci) val element = document.getElementById("test") assertEquals("<input id=\"idti\" type=\"checkbox\" checked=\"\" name=\"name\" disabled=\"\">", element?.innerHTML, "Should render correct checkbox field") @@ -27,7 +25,7 @@ class CheckBoxInputSpec : DomSpec { fun renderAsRadio() { run { val root = Root("test") - val ci = CheckBoxInput(type = CHECKINPUTTYPE.RADIO, value = true, name = "name", id = "idti", extraValue = "abc") + val ci = CheckInput(type = CHECKINPUTTYPE.RADIO, value = true, name = "name", id = "idti", extraValue = "abc") root.add(ci) val element = document.getElementById("test") assertEquals("<input id=\"idti\" type=\"radio\" checked=\"\" name=\"name\" value=\"abc\">", element?.innerHTML, "Should render correct radio button field") |