Fixes test case
This commit is contained in:
+4
-4
@@ -74,7 +74,7 @@ class Nip11RelayInformationTest {
|
||||
assertEquals("purplepag.es", info.name)
|
||||
assertEquals("Nostr's Purple Pages", info.description)
|
||||
assertEquals("fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", info.pubkey)
|
||||
assertEquals(listOf(1, 2, 9, 11), info.supported_nips)
|
||||
assertEquals(listOf("1", "2", "9", "11"), info.supported_nips)
|
||||
assertEquals("1.0.4", info.version)
|
||||
assertEquals("git+https://github.com/hoytech/strfry.git", info.software)
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class Nip11RelayInformationTest {
|
||||
assertEquals("Nostr's Purple Pages", info.description)
|
||||
assertEquals("fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", info.pubkey)
|
||||
// Single integer should be converted to a list with one element
|
||||
assertEquals(listOf(1), info.supported_nips)
|
||||
assertEquals(listOf("1"), info.supported_nips)
|
||||
assertEquals("1.0.4", info.version)
|
||||
assertEquals("git+https://github.com/hoytech/strfry.git", info.software)
|
||||
}
|
||||
@@ -132,7 +132,7 @@ class Nip11RelayInformationTest {
|
||||
assertNotNull(info)
|
||||
assertEquals("test relay", info.name)
|
||||
// Should skip invalid elements and keep only valid integers
|
||||
assertEquals(listOf(1, 3, 11), info.supported_nips)
|
||||
assertEquals(listOf("1", "3", "11"), info.supported_nips)
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -204,6 +204,6 @@ class Nip11RelayInformationTest {
|
||||
|
||||
assertNotNull(info)
|
||||
assertEquals("test relay", info.name)
|
||||
assertEquals((1..100).toList(), info.supported_nips)
|
||||
assertEquals((1..100).map { it.toString() }, info.supported_nips)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user