Skip to content

Commit eaf7550

Browse files
Fix testValueOfDisablesAutomaticKeyboardDismissal
1 parent 03ae3a8 commit eaf7550

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Tests/UICoreTests/ViewControllerTests.swift

+9-3
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@ final class ViewControllerTests: XCTestCase {
4040
}
4141

4242
func testValueOfDisablesAutomaticKeyboardDismissal() {
43-
let sut = ViewController()
43+
let sut = MockViewController()
44+
45+
sut.modalPresentationStyleGetter = {
46+
return .automatic
47+
}
4448

4549
XCTAssertFalse(sut.disablesAutomaticKeyboardDismissal)
4650

47-
// sut.modalPresentationStyle = .formSheet // This is currently failing due to missing implementation
51+
sut.modalPresentationStyleGetter = {
52+
return .formSheet
53+
}
4854

49-
// XCTAssertTrue(sut.disablesAutomaticKeyboardDismissal)
55+
XCTAssertTrue(sut.disablesAutomaticKeyboardDismissal)
5056
}
5157

5258
func testNextResponder() {

0 commit comments

Comments
 (0)