mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Adopt the lastest SDK APIs and refactor how we deal with user permissions.
This patch introduces a new RoomPowerLevelsProxy and its associated mock and adopts newer Rust APIs to make working with user power levels and permissions easier.
This commit is contained in:
committed by
Stefan Ceriu
parent
96e5ed06f5
commit
f522e15dac
@@ -517,7 +517,10 @@ class TimelineViewModelTests: XCTestCase {
|
||||
}
|
||||
try await deferred.fulfill()
|
||||
|
||||
roomProxyMock.canUserPinOrUnpinUserIDReturnValue = .success(false)
|
||||
let powerLevelsMock = RoomPowerLevelsProxyMock(configuration: .init())
|
||||
powerLevelsMock.canUserPinOrUnpinUserIDReturnValue = .success(false)
|
||||
roomProxyMock.powerLevelsReturnValue = .success(powerLevelsMock)
|
||||
|
||||
deferred = deferFulfillment(viewModel.context.$viewState) { value in
|
||||
!value.canCurrentUserPin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user