mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add some tests.
# Conflicts: # ElementX.xcodeproj/project.pbxproj
This commit is contained in:
@@ -73,7 +73,7 @@ extension RoomSummary {
|
||||
static func mock(id: String,
|
||||
name: String,
|
||||
canonicalAlias: String? = nil) -> RoomSummary {
|
||||
RoomSummary(room: RoomSDKMock(),
|
||||
RoomSummary(room: RoomSDKMock(.init()),
|
||||
id: id,
|
||||
joinRequestType: nil,
|
||||
name: name,
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright 2026 Element Creations Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
import MatrixRustSDKMocks
|
||||
|
||||
nonisolated extension RoomSDKMock {
|
||||
struct Configuration {
|
||||
var membership: Membership = .joined
|
||||
}
|
||||
|
||||
convenience init(_ configuration: Configuration) {
|
||||
self.init()
|
||||
|
||||
membershipReturnValue = configuration.membership
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user