This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/server/handlers/admin_test.go

28 lines
544 B
Go

package handlers
import (
"testing"
)
func TestNewSettingsHandler(t *testing.T) {
h := NewSettingsHandler()
if h == nil {
t.Fatal("NewSettingsHandler returned nil")
}
}
func TestNewAdminHandler(t *testing.T) {
h := NewAdminHandler()
if h == nil {
t.Fatal("NewAdminHandler returned nil")
}
}
func TestIsRegistrationEnabledDefaultsTrue(t *testing.T) {
// Without a database connection, should default to true
enabled := IsRegistrationEnabled()
if !enabled {
t.Error("Expected registration enabled by default when no DB")
}
}