quality: fix tests after api changes

This commit is contained in:
ganfra
2025-11-19 15:25:44 +01:00
parent f4f129f420
commit 12b71d6c0b
4 changed files with 5 additions and 3 deletions

View File

@@ -97,6 +97,7 @@ class ChangeRoomPermissionsPresenterTest {
presenter.present()
}.test {
val state = awaitUpdatedItem()
val initialPermissions = defaultPermissions()
state.eventSink(ChangeRoomPermissionsEvent.ChangeMinimumRoleForAction(RoomPermissionType.INVITE, SelectableRole.Moderator))
state.eventSink(ChangeRoomPermissionsEvent.ChangeMinimumRoleForAction(RoomPermissionType.KICK, SelectableRole.Moderator))
@@ -120,6 +121,7 @@ class ChangeRoomPermissionsPresenterTest {
roomName = Moderator.powerLevel,
roomAvatar = Moderator.powerLevel,
roomTopic = Moderator.powerLevel,
spaceChild = initialPermissions.spaceChild
)
)
}

View File

@@ -746,7 +746,7 @@ class DefaultBaseRoomLastMessageFormatterTest {
OtherState.RoomCanonicalAlias,
OtherState.RoomGuestAccess,
OtherState.RoomHistoryVisibility,
OtherState.RoomJoinRules,
OtherState.RoomJoinRules(null),
OtherState.RoomPinnedEvents(OtherState.RoomPinnedEvents.Change.CHANGED),
OtherState.RoomUserPowerLevels(emptyMap()),
OtherState.RoomServerAcl,

View File

@@ -601,7 +601,7 @@ class DefaultPinnedMessagesBannerFormatterTest {
OtherState.RoomCanonicalAlias,
OtherState.RoomGuestAccess,
OtherState.RoomHistoryVisibility,
OtherState.RoomJoinRules,
OtherState.RoomJoinRules(null),
OtherState.RoomPinnedEvents(OtherState.RoomPinnedEvents.Change.CHANGED),
OtherState.RoomUserPowerLevels(emptyMap()),
OtherState.RoomServerAcl,

View File

@@ -510,7 +510,7 @@ class InReplyToMetadataKtTest {
fun `state content`() = runTest {
moleculeFlow(RecompositionMode.Immediate) {
anInReplyToDetailsReady(
eventContent = StateContent("", OtherState.RoomJoinRules)
eventContent = StateContent("", OtherState.RoomJoinRules(null))
).metadata(hideImage = false)
}.test {
awaitItem().let {