From 5bf6223a5c55ac0119642af077248cb62829c310 Mon Sep 17 00:00:00 2001 From: Yoland Y <4950057+yoland68@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:48:39 -0800 Subject: [PATCH] Update mock SendSecurityCouncilMessage --- integration-tests/registry_integration_test.go | 4 ++-- mock/gateways/mock_discord_service.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/integration-tests/registry_integration_test.go b/integration-tests/registry_integration_test.go index e9d0bfc..84987ef 100644 --- a/integration-tests/registry_integration_test.go +++ b/integration-tests/registry_integration_test.go @@ -116,8 +116,8 @@ func newMockedImpl(client *ent.Client, cfg *config.Config) (impl mockedImpl, aut mockStorageService := new(gateways.MockStorageService) mockDiscordService := new(gateways.MockDiscordService) - mockDiscordService.On("SendSecurityCouncilMessage", mock.Anything). - Return(nil) // Do nothing for all discord messsage calls. + mockDiscordService.On("SendSecurityCouncilMessage", mock.Anything, mock.Anything). + Return(nil) // Update mock to accept both string and bool parameters mockSlackService := new(gateways.MockSlackService) mockSlackService. diff --git a/mock/gateways/mock_discord_service.go b/mock/gateways/mock_discord_service.go index 4ce420a..54afdd0 100644 --- a/mock/gateways/mock_discord_service.go +++ b/mock/gateways/mock_discord_service.go @@ -8,7 +8,8 @@ type MockDiscordService struct { mock.Mock } -func (m *MockDiscordService) SendSecurityCouncilMessage(msg string) error { - args := m.Called(msg) +func (m *MockDiscordService) SendSecurityCouncilMessage(msg string, private bool ) error { + args := m.Called(msg, private) return args.Error(0) } +