1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +00:00

tests(services/mailer): coverage for the issue/default.tmpl logic

* the tests fail when issue/default.tmpl is removed
* coverage for:
  * activities_model.ActionCreateIssue
  * activities_model.ActionCommentIssue
  * activities_model.ActionCloseIssue
  * activities_model.ActionReopenIssue
  * activities_model.ActionCommentPull
  * activities_model.ActionMergePullRequest
  * activities_model.ActionApprovePullRequest
  * activities_model.ActionRejectPullRequest
* replace mocks with calls to mockMailSettings
This commit is contained in:
Earl Warren 2024-05-17 16:47:35 +02:00
parent 23bbec4459
commit 55c850a8a8
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 104 additions and 14 deletions

View file

@ -365,10 +365,8 @@ func (s *sendmailSender) Send(from string, to []string, msg io.WriterTo) error {
return waitError
}
// Sender sendmail mail sender
type dummySender struct{}
// Send send email
func (s *dummySender) Send(from string, to []string, msg io.WriterTo) error {
buf := bytes.Buffer{}
if _, err := msg.WriteTo(&buf); err != nil {