(ctx context.Context, t *testing.T, db database.Store, inboxHandler *dispatch.InboxHandler, username string, templateID uuid.UUID)
| 325 | } |
| 326 | |
| 327 | func sendInboxNotification(ctx context.Context, t *testing.T, db database.Store, inboxHandler *dispatch.InboxHandler, username string, templateID uuid.UUID) error { |
| 328 | user, err := db.GetUserByEmailOrUsername(ctx, database.GetUserByEmailOrUsernameParams{ |
| 329 | Username: username, |
| 330 | }) |
| 331 | require.NoError(t, err) |
| 332 | |
| 333 | dispatchFunc, err := inboxHandler.Dispatcher(types.MessagePayload{ |
| 334 | UserID: user.ID.String(), |
| 335 | NotificationTemplateID: templateID.String(), |
| 336 | }, "", "", nil) |
| 337 | if err != nil { |
| 338 | return err |
| 339 | } |
| 340 | |
| 341 | _, err = dispatchFunc(ctx, uuid.New()) |
| 342 | if err != nil { |
| 343 | return err |
| 344 | } |
| 345 | |
| 346 | return nil |
| 347 | } |
no test coverage detected