mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:02:10 +00:00
Add tests for the UserSessionStore. (#6065)
* Add enough mock configurations to test the UserSessionStore. * Add tests for the UserSessionStore.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user