Skip to content

Commit

Permalink
Fix problem with mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas committed Oct 24, 2023
1 parent a50e30d commit 24c8c2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/api/message/v3/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ type mockedMlsValidationService struct {
func (m *mockedMlsValidationService) ValidateKeyPackages(ctx context.Context, keyPackages [][]byte) ([]mlsvalidate.IdentityValidationResult, error) {
args := m.Called(ctx, keyPackages)

return args.Get(0).([]mlsvalidate.IdentityValidationResult), args.Error(1)
response := args.Get(0)
if response == nil {
return nil, args.Error(1)
}

return response.([]mlsvalidate.IdentityValidationResult), args.Error(1)
}

func (m *mockedMlsValidationService) ValidateGroupMessages(ctx context.Context, groupMessages [][]byte) ([]mlsvalidate.GroupMessageValidationResult, error) {
Expand Down

0 comments on commit 24c8c2a

Please sign in to comment.