Skip to content

Commit 2afe6ba

Browse files
committed
Input key tests
1 parent dbd52bd commit 2afe6ba

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Tests/SwiftHtmlTests/Tags/InputTagTests.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ final class InputTagTests: XCTestCase {
3737
""")
3838
}
3939

40+
func testKey() {
41+
let doc = Document(.unspecified) {
42+
Input()
43+
.type(.text)
44+
.key("email")
45+
}
46+
47+
XCTAssertEqual(DocumentRenderer().render(doc), """
48+
<input type="text" id="email" name="email">
49+
""")
50+
}
4051

4152

4253
}

0 commit comments

Comments
 (0)