Better integrate RoomPowerLevelsProxyMock's own Configuration struct.

This commit is contained in:
Stefan Ceriu
2025-06-20 16:43:39 +03:00
committed by Stefan Ceriu
parent f522e15dac
commit cbf405a67e
9 changed files with 52 additions and 39 deletions
@@ -370,8 +370,8 @@ class RoomScreenViewModelTests: XCTestCase {
func testKnockRequestsBannerDoesNotAppearIfUserHasNoPermission() async throws {
ServiceLocator.shared.settings.knockingEnabled = true
let roomProxyMock = JoinedRoomProxyMock(.init(knockRequestsState: .loaded([KnockRequestProxyMock(.init(eventID: "1", userID: "@alice:matrix.org", displayName: "Alice", reason: "Hello World!"))]),
canUserInvite: false,
joinRule: .knock))
joinRule: .knock,
powerLevelsConfiguration: .init(canUserInvite: false)))
let viewModel = RoomScreenViewModel(clientProxy: ClientProxyMock(),
roomProxy: roomProxyMock,
initialSelectedPinnedEventID: nil,