func (mock *templateMock) RenderCalls() []struct {
	Args interface{}
} {
	var calls []struct {
		Args interface{}
	}
	mock.lockRender.RLock()
	calls = mock.calls.Render
	mock.lockRender.RUnlock()
	return calls
}
RenderCalls gets all the calls that were made to Render.
Check the length with:
len(mockedtemplate.RenderCalls())
package mailer
import (
	"gopkg.in/mail.v2"
	"sync"
)
var _ template = &templateMock{}
type templateMock struct {
	RenderFunc func(args interface{}) (*mail.Message, error)
	calls struct {
		Render []struct {
			Args interface{}
		}
	}
	lockRender sync.RWMutex
}
func (mock *templateMock) Render(args interface{}) (*mail.Message, error) {
	if mock.RenderFunc == nil {
		panic("templateMock.RenderFunc: method is nil but template.Render was just called")
	}
	callInfo := struct {
		Args interface{}
	}{
		Args: args,
	}
	mock.lockRender.Lock()
	mock.calls.Render = append(mock.calls.Render, callInfo)
	mock.lockRender.Unlock()
	return mock.RenderFunc(args)
}