From c71e55ecc4c2381785b5f8ae10af74d8a537d6c3 Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 7 Jul 2021 15:46:42 +0200 Subject: clean up some weirdness in the router (#80) --- testrig/db.go | 1 + testrig/router.go | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'testrig') diff --git a/testrig/db.go b/testrig/db.go index 5fa019adc..01cf93934 100644 --- a/testrig/db.go +++ b/testrig/db.go @@ -47,6 +47,7 @@ var testModels []interface{} = []interface{}{ >smodel.Emoji{}, >smodel.Instance{}, >smodel.Notification{}, + >smodel.RouterSession{}, &oauth.Token{}, &oauth.Client{}, } diff --git a/testrig/router.go b/testrig/router.go index 83ce7b602..5770191ea 100644 --- a/testrig/router.go +++ b/testrig/router.go @@ -18,11 +18,14 @@ package testrig -import "github.com/superseriousbusiness/gotosocial/internal/router" +import ( + "github.com/superseriousbusiness/gotosocial/internal/db" + "github.com/superseriousbusiness/gotosocial/internal/router" +) // NewTestRouter returns a Router suitable for testing -func NewTestRouter() router.Router { - r, err := router.New(NewTestConfig(), NewTestLog()) +func NewTestRouter(db db.DB) router.Router { + r, err := router.New(NewTestConfig(), db, NewTestLog()) if err != nil { panic(err) } -- cgit v1.3