Skip to content

Commit

Permalink
Update mock SendSecurityCouncilMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
yoland68 committed Dec 31, 2024
1 parent 6c2bdb7 commit 5bf6223
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions integration-tests/registry_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions mock/gateways/mock_discord_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 5bf6223

Please sign in to comment.