Skip to content

Commit a06719c

Browse files
committed
Fixes unit tests for example app.
1 parent cfe8543 commit a06719c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

RxExample/RxExample-iOSTests/Mocks/MockGitHubAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class MockGitHubAPI : GitHubAPI {
1414

1515
init(
1616
usernameAvailable: @escaping (String) -> Observable<Bool> = notImplemented(),
17-
signup: @escaping (String, String) -> Observable<Bool> = notImplemented()
17+
signup: @escaping ((String, String)) -> Observable<Bool> = notImplemented()
1818
) {
1919
_usernameAvailable = usernameAvailable
2020
_signup = signup

RxExample/RxExample-iOSTests/Mocks/MockWireframe.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class MockWireframe : Wireframe {
1414
let _promptFor: (String, Any, [Any]) -> Observable<Any>
1515

1616
init(openURL: @escaping (URL) -> () = notImplementedSync(),
17-
promptFor: @escaping (String, Any, [Any]) -> Observable<Any> = notImplemented()) {
17+
promptFor: @escaping ((String, Any, [Any])) -> Observable<Any> = notImplemented()) {
1818
_openURL = openURL
1919
_promptFor = promptFor
2020
}

RxExample/RxExample-iOSTests/RxExample_iOSTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ extension RxExample_iOSTests {
185185
return "---f"
186186
}
187187
},
188-
signup: scheduler.mock(values: booleans, errors: errors) { (username, password) -> String in
188+
signup: scheduler.mock(values: booleans, errors: errors) { (args: (String, String)) -> String in
189+
let (username, password) = args
189190
if username == "secretusername" && password == "secret" {
190191
return "--t"
191192
}

0 commit comments

Comments
 (0)