@@ -7,6 +7,8 @@ import (
|
||||
|
||||
pbaero "github.com/flowy-live/llink/genproto/aero"
|
||||
mock_billing "github.com/flowy-live/llink/internal/billing/mocks"
|
||||
"github.com/flowy-live/llink/internal/human"
|
||||
mock_human "github.com/flowy-live/llink/internal/human/mocks"
|
||||
mock_livestore "github.com/flowy-live/llink/internal/livestore/mocks"
|
||||
"github.com/flowy-live/llink/internal/network"
|
||||
"github.com/flowy-live/llink/internal/testhelper"
|
||||
@@ -41,7 +43,15 @@ func newTestService(t *testing.T) network.Service {
|
||||
mockPub.EXPECT().Add(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
|
||||
mockPub.EXPECT().Remove(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
|
||||
|
||||
return network.NewService(dbPool, mockAero, mockBilling, mockPub)
|
||||
mockHuman := mock_human.NewMockService(ctrl)
|
||||
mockHuman.EXPECT().GetByID(gomock.Any(), gomock.Any()).Return(&human.Human{
|
||||
ID: "test_human",
|
||||
Email: "[email protected]",
|
||||
EmailPrefix: "test",
|
||||
EmailNotificationsEnabled: false,
|
||||
}, nil).AnyTimes()
|
||||
|
||||
return network.NewService(dbPool, mockAero, mockBilling, mockPub, mockHuman)
|
||||
}
|
||||
|
||||
func TestNetworkService(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user