test(quartz): drop a redundant safe call the compiler flagged

assertTrue(entry?.isGeneric == true) smart-casts entry to non-null, so
the next line's ?. was dead and the build warned on it. Assert
non-nullness once up front and read the fields plainly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MXpL2TPmSmxdv7eBwhWvJp
This commit is contained in:
Claude
2026-08-28 22:17:18 +00:00
parent 42c297104c
commit cdfc7ddb17
@@ -40,6 +40,7 @@ import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
import kotlin.test.assertFalse
import kotlin.test.assertIs
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue
@@ -70,13 +71,13 @@ class TreasureMapEntryTest {
@Test
fun readsTheGenericBareKindEntry() {
val entry = map(arrayOf("30392", publisher, nip85)).publicTrustedListProvider(UserTrustedListEvent.KIND)
val entry = assertNotNull(map(arrayOf("30392", publisher, nip85)).publicTrustedListProvider(UserTrustedListEvent.KIND))
assertEquals(UserTrustedListEvent.KIND, entry?.kind)
assertEquals(publisher, entry?.pubkey)
assertEquals("$nip85/", entry?.relayUrl?.url)
assertTrue(entry?.isGeneric == true)
assertNull(entry?.name)
assertEquals(UserTrustedListEvent.KIND, entry.kind)
assertEquals(publisher, entry.pubkey)
assertEquals("$nip85/", entry.relayUrl?.url)
assertTrue(entry.isGeneric)
assertNull(entry.name)
}
@Test