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:
parent
23bbec4459
commit
55c850a8a8
2 changed files with 104 additions and 14 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue