mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-08 23:31:41 +02:00
feat(kind): using constants
This commit is contained in:
@ -112,7 +112,7 @@ func TestEncodeNprofile(t *testing.T) {
|
||||
func TestEncodeDecodeNaddr(t *testing.T) {
|
||||
naddr, err := EncodeEntity(
|
||||
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
|
||||
30023,
|
||||
nostr.KindArticle,
|
||||
"banana",
|
||||
[]string{
|
||||
"wss://relay.nostr.example.mydomain.example.com",
|
||||
@ -136,7 +136,7 @@ func TestEncodeDecodeNaddr(t *testing.T) {
|
||||
if ep.PublicKey != "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d" {
|
||||
t.Error("returned wrong pubkey")
|
||||
}
|
||||
if ep.Kind != 30023 {
|
||||
if ep.Kind != nostr.KindArticle {
|
||||
t.Error("returned wrong kind")
|
||||
}
|
||||
if ep.Identifier != "banana" {
|
||||
@ -159,7 +159,7 @@ func TestDecodeNaddrWithoutRelays(t *testing.T) {
|
||||
if ep.PublicKey != "7fa56f5d6962ab1e3cd424e758c3002b8665f7b0d8dcee9fe9e288d7751ac194" {
|
||||
t.Error("returned wrong pubkey")
|
||||
}
|
||||
if ep.Kind != 30023 {
|
||||
if ep.Kind != nostr.KindArticle {
|
||||
t.Error("returned wrong kind")
|
||||
}
|
||||
if ep.Identifier != "references" {
|
||||
|
Reference in New Issue
Block a user