Skip to content

Commit

Permalink
Merge pull request #8 from fastbill/hotfix/add-mailermock
Browse files Browse the repository at this point in the history
Add template mailer mock
  • Loading branch information
perajovic authored Jan 30, 2020
2 parents 3907725 + 2e8606c commit c3e7328
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mock/templatemailer.go
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)
}

0 comments on commit c3e7328

Please sign in to comment.