fix: add retention to nip-11

This commit is contained in:
ZigBalthazar
2025-01-14 15:59:35 +03:30
committed by fiatjaf_
parent cb9e554fc9
commit ddd8976d3f
2 changed files with 31 additions and 8 deletions
+10
View File
@@ -28,6 +28,13 @@ func TestAddSupportedNIP(t *testing.T) {
assert.Contains(t, info.SupportedNIPs, 0, 1, 2, 12, 13, 17, 18, 19, 44)
}
func TestAddSupportedNIPs(t *testing.T) {
info := RelayInformationDocument{}
info.AddSupportedNIPs([]int{0, 1, 2, 12, 13, 17, 18, 19, 44})
assert.Contains(t, info.SupportedNIPs, 0, 1, 2, 12, 13, 17, 18, 19, 44)
}
func TestFetch(t *testing.T) {
tests := []struct {
inputURL string
@@ -38,6 +45,9 @@ func TestFetch(t *testing.T) {
{"wss://nostr.wine", false, "", "wss://nostr.wine"},
{"https://nostr.wine", false, "", "wss://nostr.wine"},
{"nostr.wine", false, "", "wss://nostr.wine"},
{"jellyfish.land", false, "", "wss://jellyfish.land"},
{"https://jellyfish.land", false, "", "wss://jellyfish.land"},
{"wss://jellyfish.land", false, "", "wss://jellyfish.land"},
{"wlenwqkeqwe.asjdaskd", true, "", "wss://wlenwqkeqwe.asjdaskd"},
}