mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Soft logout removal (#672)
* Remove isSoftLogout from everywhere except the client delegate - bump the RustSDK to v1.0.43 - cleanup the app coordinator state machine and login/logout flows * Merge `succeededSigningIn` and `succeededRestoringSession` into `createdUserSession` in order to simplify the logic
This commit is contained in:
@@ -37,7 +37,6 @@ class KeychainControllerTests: XCTestCase {
|
||||
userId: "userId",
|
||||
deviceId: "deviceId",
|
||||
homeserverUrl: "homeserverUrl",
|
||||
isSoftLogout: false,
|
||||
slidingSyncProxy: "https://my.sync.proxy"))
|
||||
keychain.setRestorationToken(restorationToken, forUsername: username)
|
||||
|
||||
@@ -53,7 +52,6 @@ class KeychainControllerTests: XCTestCase {
|
||||
userId: "userId",
|
||||
deviceId: "deviceId",
|
||||
homeserverUrl: "homeserverUrl",
|
||||
isSoftLogout: false,
|
||||
slidingSyncProxy: "https://my.sync.proxy"))
|
||||
keychain.setRestorationToken(restorationToken, forUsername: username)
|
||||
XCTAssertEqual(keychain.restorationTokens().count, 1, "The keychain should have 1 restoration token.")
|
||||
@@ -75,7 +73,6 @@ class KeychainControllerTests: XCTestCase {
|
||||
userId: "userId",
|
||||
deviceId: "deviceId",
|
||||
homeserverUrl: "homeserverUrl",
|
||||
isSoftLogout: false,
|
||||
slidingSyncProxy: "https://my.sync.proxy"))
|
||||
keychain.setRestorationToken(restorationToken, forUsername: "@test\(index):example.com")
|
||||
}
|
||||
@@ -96,7 +93,6 @@ class KeychainControllerTests: XCTestCase {
|
||||
userId: "userId",
|
||||
deviceId: "deviceId",
|
||||
homeserverUrl: "homeserverUrl",
|
||||
isSoftLogout: false,
|
||||
slidingSyncProxy: "https://my.sync.proxy"))
|
||||
keychain.setRestorationToken(restorationToken, forUsername: "@test\(index):example.com")
|
||||
}
|
||||
|
||||
@@ -69,20 +69,4 @@ final class UserSessionTests: XCTestCase {
|
||||
controller.callbacks.send(.finished)
|
||||
waitForExpectations(timeout: 1.0)
|
||||
}
|
||||
|
||||
func test_whenUserSessionReceivesUpdatedRestoreToken_updateRestoreTokenNeededEventReceived() throws {
|
||||
let expectation = expectation(description: "UpdatedRestoreToken expectation")
|
||||
userSession.callbacks.sink { callback in
|
||||
switch callback {
|
||||
case .updateRestoreTokenNeeded:
|
||||
expectation.fulfill()
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
clientProxy.callbacks.send(.updatedRestoreToken)
|
||||
waitForExpectations(timeout: 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user