From da8236ef46f871b91668d371a577b4cf9072c8d9 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Fri, 13 Feb 2026 10:49:26 -0800 Subject: [PATCH] Fix some tests --- zooid/config_test.go | 4 ---- zooid/instance_test.go | 5 +---- zooid/management_test.go | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/zooid/config_test.go b/zooid/config_test.go index 3ef129b..d6c182b 100644 --- a/zooid/config_test.go +++ b/zooid/config_test.go @@ -14,7 +14,6 @@ func TestConfig_IsOwner(t *testing.T) { Info: struct { Name string `toml:"name"` Icon string `toml:"icon"` - Secret string `toml:"secret"` Pubkey string `toml:"pubkey"` Description string `toml:"description"` }{ @@ -91,7 +90,6 @@ func TestConfig_CanManage(t *testing.T) { Info: struct { Name string `toml:"name"` Icon string `toml:"icon"` - Secret string `toml:"secret"` Pubkey string `toml:"pubkey"` Description string `toml:"description"` }{ @@ -128,7 +126,6 @@ func TestConfig_CanInvite(t *testing.T) { Info: struct { Name string `toml:"name"` Icon string `toml:"icon"` - Secret string `toml:"secret"` Pubkey string `toml:"pubkey"` Description string `toml:"description"` }{ @@ -164,7 +161,6 @@ func TestConfig_MemberRole(t *testing.T) { Info: struct { Name string `toml:"name"` Icon string `toml:"icon"` - Secret string `toml:"secret"` Pubkey string `toml:"pubkey"` Description string `toml:"description"` }{ diff --git a/zooid/instance_test.go b/zooid/instance_test.go index 29a8158..2c2ab61 100644 --- a/zooid/instance_test.go +++ b/zooid/instance_test.go @@ -17,7 +17,6 @@ func createTestInstance() *Instance { Info: struct { Name string `toml:"name"` Icon string `toml:"icon"` - Secret string `toml:"secret"` Pubkey string `toml:"pubkey"` Description string `toml:"description"` }{ @@ -156,8 +155,6 @@ func TestInstance_GenerateInviteEvent(t *testing.T) { } func TestInstance_IsInternalEvent(t *testing.T) { - instance := createTestInstance() - tests := []struct { name string event nostr.Event @@ -207,7 +204,7 @@ func TestInstance_IsInternalEvent(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - result := instance.IsInternalEvent(tt.event) + result := IsInternalEvent(tt.event) if result != tt.want { t.Errorf("IsInternalEvent() = %v, want %v", result, tt.want) } diff --git a/zooid/management_test.go b/zooid/management_test.go index 9f2b0ea..696d3bc 100644 --- a/zooid/management_test.go +++ b/zooid/management_test.go @@ -92,7 +92,7 @@ func TestManagementStore_BanEvent(t *testing.T) { bannedItems := mgmt.GetBannedEventItems() itemFound := false for _, item := range bannedItems { - if item.ID == eventID.Hex() && item.Reason == reason { + if item.ID == eventID && item.Reason == reason { itemFound = true break }