aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/owner_routes_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 21:44:49 -0400
committerhistoria <[not public]>2026-09-18 21:44:49 -0400
commite7848ea79a9a57fdf391d30c48ce649f3d2f6180 (patch)
treea2972facd5bbe88006f40ff96a1eeadd570ac15b /internal/admin/owner_routes_test.go
parenta8a67482bbff8297a96adff65d2fd7029ed998cc (diff)
downloadthehouseoficarus-e7848ea79a9a57fdf391d30c48ce649f3d2f6180.tar.gz
refactor: dedup admin entity handlers and server construction
Diffstat (limited to 'internal/admin/owner_routes_test.go')
-rw-r--r--internal/admin/owner_routes_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/admin/owner_routes_test.go b/internal/admin/owner_routes_test.go
index a061b0e..84f48c8 100644
--- a/internal/admin/owner_routes_test.go
+++ b/internal/admin/owner_routes_test.go
@@ -16,9 +16,14 @@ import (
func TestAPIRoutesRequireOwnerAdmission(t *testing.T) {
h, _ := newEditorHarness(t)
tasks := 0
- s, err := NewServer(config.Default(), false, h.g.AccountStore, h.g.World, h.g.ItemStore, h.g.ObjectStore, h.g.MobStore, h.dir,
- h.g.CourseStore.ReloadAll, h.g.MigrateRoomIDsOnOwner, h.g.EvictCasinoRoom, h.g.RebuildCraftIndex, filepath.Join(h.dir, "config.yaml"),
- func(func()) bool { tasks++; return false })
+ s, err := NewServer(ServerDeps{
+ Config: config.Default(), Accounts: h.g.AccountStore, World: h.g.World, Items: h.g.ItemStore,
+ Objects: h.g.ObjectStore, Mobs: h.g.MobStore, DataDir: h.dir,
+ ReloadCourses: h.g.CourseStore.ReloadAll, RewriteRoomIDs: h.g.MigrateRoomIDsOnOwner,
+ EvictRoom: h.g.EvictCasinoRoom, RebuildCraftIndex: h.g.RebuildCraftIndex,
+ ConfigPath: filepath.Join(h.dir, "config.yaml"),
+ RunOnOwner: func(func()) bool { tasks++; return false },
+ })
if err != nil {
t.Fatal(err)
}