test: pin what outlives the founding-admins check (remove-founding-admins-card, Phase 0)

The retired caption type's place in MEMBERSHIP_TYPES moves to
ChatRoomLastMessagePreviewTest, and the legacy-room case asserts no key
state directly rather than through FoundingAdmins.check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-20 10:37:59 +02:00
1 parent aaabc5197d
commit 47eb485201
2 files changed
+17 -3

No files matched your search

@@ -7,6 +7,7 @@ import mobi.giza.compose.database.model.Profile
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNull
import kotlin.test.assertTrue
import kotlin.time.Instant
/**
@@ -172,6 +173,19 @@ class ChatRoomLastMessagePreviewTest {
}
}
/**
* No longer written, but rows of it are still on devices, written as the user's own.
* Out of the set, each one would render as a bubble from the user.
* docs/remove-founding-admins-card.md, D3.
*/
@Test
fun `a retired caption type still renders as a caption`() {
assertTrue(
ChatMessage.TYPE_FOUNDING_ADMINS_MISSING in ChatMessage.MEMBERSHIP_TYPES,
"it would render as a chat bubble",
)
}
/**
* The bystanders' copy of a private message has no content. An empty preview would
* read as the sender having said nothing, so the line says what the group can in
@@ -20,6 +20,7 @@ import kotlin.test.assertFalse
import kotlin.test.assertEquals
import kotlin.test.assertIs
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -480,9 +481,8 @@ class RobustGroupAdminsJvmTest {
val group = assertNotNull(room.chatRoom.toMlsGroup(), "$joiner holds no group ($profile)")
assertEquals(setOf(creator.publicKey), group.currentAdminIdentities(), "$joiner's admin policy ($profile)")
assertFalse(group.isLocalAdmin(), "$joiner is not an admin of a room its creator runs ($profile)")
assertEquals(
FoundingAdmins.Check.NotKeyBacked,
FoundingAdmins.check(joiner.db, soloRoomId),
assertNull(
joiner.db.groupKeyStateDao().getByChatRoomId(soloRoomId),
"no key behind it, so no founders to check ($profile)",
)
}