Fix some tests

This commit is contained in:
Jon Staab
2026-02-13 10:49:26 -08:00
parent 616818386a
commit da8236ef46
3 changed files with 2 additions and 9 deletions
-4
View File
@@ -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"`
}{
+1 -4
View File
@@ -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)
}
+1 -1
View File
@@ -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
}