aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-10-19 13:51:01 +0200
committerRobert Jaros <rjaros@finn.pl>2017-10-19 13:51:01 +0200
commit6caae545b7961f9ba5f136d38730ecf026ab7fbb (patch)
tree46e987bbf1cc0c30075c32e50140f4f90834c22c /src/test
parentd17f27058f41f2dddd9fd5e88149ed55f9f7bf0c (diff)
downloadkvision-6caae545b7961f9ba5f136d38730ecf026ab7fbb.tar.gz
kvision-6caae545b7961f9ba5f136d38730ecf026ab7fbb.tar.bz2
kvision-6caae545b7961f9ba5f136d38730ecf026ab7fbb.zip
Refactoring - CheckBoxInput -> CheckInput
Diffstat (limited to 'src/test')
-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")