Skip to content

Commit 3734642

Browse files
committed
Add test for TextInput
1 parent 54bbeee commit 3734642

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Tests/TwoWayBindingTests.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@ private class TwoWayBindingTests: XCTestCase {
8888
.next("changed 2"),
8989
.next("changed 3")])
9090
}
91+
92+
func testTextInput() {
93+
let bag = DisposeBag()
94+
let textField = UITextField()
95+
let variable = Variable("start")
96+
97+
(textField.rx.textInput <-> variable)
98+
.disposed(by: bag)
99+
100+
XCTAssertEqual(textField.text, "start")
101+
}
91102
}
92103

93104
private class MockObserver<ElementType>: ObserverType {

0 commit comments

Comments
 (0)