Add tests for the UserSessionStore. (#6065)

* Add enough mock configurations to test the UserSessionStore.

* Add tests for the UserSessionStore.
This commit is contained in:
Doug
2026-08-25 16:41:43 +01:00
committed by GitHub
parent 353233672a
commit c8b12d9496
15 changed files with 468 additions and 27 deletions
@@ -8,6 +8,18 @@
import MatrixRustSDK
extension KeychainControllerMock {
struct Configuration {
var restorationTokens: [KeychainCredentials] = []
}
convenience init(_ configuration: Configuration) {
self.init()
restorationTokensReturnValue = configuration.restorationTokens
}
}
/// Adds the missing methods for conformance to the protocol.
extension KeychainControllerMock {
func retrieveSessionFromKeychain(userId: String) throws -> Session {