go-nostr/count_test.go

22 lines
477 B
Go
Raw Permalink Normal View History

2023-07-18 16:17:00 -03:00
package nostr
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
2023-07-18 16:17:00 -03:00
)
func TestCount(t *testing.T) {
2025-03-10 02:33:47 -03:00
const RELAY = "wss://chorus.mikedilger.com:444"
2023-07-18 16:17:00 -03:00
rl := mustRelayConnect(t, RELAY)
2023-07-18 16:17:00 -03:00
defer rl.Close()
count, _, err := rl.Count(context.Background(), Filters{
2024-09-19 14:12:41 +03:30
{Kinds: []int{KindFollowList}, Tags: TagMap{"p": []string{"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"}}},
2023-07-18 16:17:00 -03:00
})
assert.NoError(t, err)
assert.Greater(t, count, int64(0))
2023-07-18 16:17:00 -03:00
}