-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from fastbill/hotfix/add-mailermock
Add template mailer mock
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package mock | ||
|
||
import ( | ||
"github.com/fastbill/go-mail/v3" | ||
|
||
tmock "github.com/stretchr/testify/mock" | ||
) | ||
|
||
// TemplateMailer is a mock implementation of the mail.TemplateMailer interface. | ||
type TemplateMailer struct { | ||
tmock.Mock | ||
} | ||
|
||
// Send is a mock implementation of mail.TemplateMailer#Send. | ||
func (m *TemplateMailer) Send(template *mail.Template, config *mail.Config) error { | ||
args := m.Called(template, config) | ||
|
||
return args.Error(0) | ||
} |