refactor: use shared mocks for tests

This commit is contained in:
talksik
2026-04-22 09:06:10 -07:00
parent 2e9ff742a0
commit 110f4594be
10 changed files with 304 additions and 174 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ import (
pbaero "github.com/flowy-live/llink/genproto/aero"
"github.com/flowy-live/llink/internal/testhelper"
"github.com/flowy-live/llink/internal/testhelper/mocks/aero"
"github.com/flowy-live/llink/internal/waitlist"
"github.com/flowy-live/llink/internal/waitlist/mocks"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
@@ -26,7 +26,7 @@ func TestMain(m *testing.M) {
func newTestService(t *testing.T) waitlist.Service {
ctrl := gomock.NewController(t)
mockAero := mocks.NewMockPrimaryClient(ctrl)
mockAero := aero.NewMockPrimaryClient(ctrl)
mockAero.EXPECT().
ShootEmail(gomock.Any(), gomock.Any()).
Return(&pbaero.ShootEmailResponse{}, nil).