#40: Add basic AuthenticationService and missing UI tests.

* Add MockAuthenticationService and ServerSelectionUITests.
* Add tests covering the Authentication flow.
This commit is contained in:
Doug
2022-07-04 10:00:27 +01:00
committed by GitHub
parent 0a199ee611
commit 26d8affaa8
29 changed files with 641 additions and 203 deletions
@@ -136,14 +136,11 @@ class LoginViewModelTests: XCTestCase {
// Given the coordinator and view model results that contain passwords.
let password = "supersecretpassword"
let viewModelAction: LoginViewModelAction = .login(username: "Alice", password: password)
let coordinatorAction: LoginCoordinatorAction = .login(username: "Alice", password: password)
// When creating a string representation of those results (e.g. for logging).
let viewModelActionString = "\(viewModelAction)"
let coordinatorActionString = "\(coordinatorAction)"
// Then the password should not be included in that string.
XCTAssertFalse("\(viewModelActionString)".contains(password), "The password must not be included in any strings.")
XCTAssertFalse("\(coordinatorActionString)".contains(password), "The password must not be included in any strings.")
}
}