From c502dc6ed888a4cf2c8b36176585f4166536ab6d Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 22 Oct 2022 14:41:40 +0800 Subject: refactor(db): move some methods from `user.go` to `users.go` (#7195) --- internal/conf/mocks.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/conf/mocks.go') diff --git a/internal/conf/mocks.go b/internal/conf/mocks.go index d4e57d38..af5b1bd7 100644 --- a/internal/conf/mocks.go +++ b/internal/conf/mocks.go @@ -16,6 +16,14 @@ func SetMockApp(t *testing.T, opts AppOpts) { }) } +func SetMockAuth(t *testing.T, otps AuthOpts) { + before := Auth + Auth = otps + t.Cleanup(func() { + Auth = before + }) +} + func SetMockServer(t *testing.T, opts ServerOpts) { before := Server Server = opts -- cgit v1.2.3