mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
* allow workflow_dispatch trigger for Server CI (for plugins CI) * [MM-68402] MBE Phase 2: declare four generic plugin hooks (#36291) * new hooks-only phase 2 * remove ChannelWillBeMoved * remove RecapWillBeProcessed and MessageWillBeRewrittenByAI Drop the AI/recap hooks from the new-hook surface; AI-LLM paths remain uncovered in tech preview and are documented as residuals. * [MM-68403] MBE Phase 3: ChannelGuards primitive (storage + cache + plugin API) (#36365) * phase 3 * phase 3: register ChannelGuard mock in test setup helper NewChannels' startup-time call to reloadGuardCache invokes s.ChannelGuard().GetAll(); without an expectation on the mock store, every test that sets up the server with GetMockStoreForSetupFunctions panics during init. * phase 3: register ChannelGuard mock in retrylayer test retrylayer.New walks every store getter to wrap it; without the mock expectation on ChannelGuard, TestRetry panics during layer construction. * use rctx properly in the store methods * phase 3: match rctx arg in testlib ChannelGuard mock GetAll now takes request.CTX, so the testify expectation must include mock.Anything; otherwise the call panics under the mocked store. * phase 3: set api.ctx in TestChannelGuardLowercaseNormalization The test constructs PluginAPI directly without a ctx, which used to work when App.RegisterChannelGuard built its own EmptyContext. Now that the App methods take rctx from the caller, the nil ctx panics inside RequestContextWithMaster. * [MM-68404] MBE Phase 4: App-layer plugin hook wiring (#36407) * phase 4 * Fix nil rctx in TestChannelGuardLowercaseNormalization The PluginAPI struct literal was missing ctx: rctx after a refactor moved the rctx declaration below the struct construction, leaving api.ctx as nil. This caused a nil pointer dereference in reloadGuardCache when RegisterChannelGuard called store.RequestContextWithMaster(nil). * Remove ChannelWillBeMoved hook call from MoveChannel (phase 4) The hook and its ID were removed from mbe-phase-2 but the call site in MoveChannel and its i18n string were not cleaned up during the rebase. * remove channel will be moved test * Remove RecapWillBeProcessed and MessageWillBeRewrittenByAI hook calls (phase 4) The hooks and their IDs were removed from mbe-phase-2 but the call sites in ProcessRecapChannel and RewriteMessage, their i18n strings, and their tests were not cleaned up during the rebase. * Revert channel_id plumbing on rewrite endpoint (phase 4) The channel_id field on RewriteRequest was added in phase 4 to feed the synthetic post passed to MessageWillBeRewrittenByAI. With that hook removed from mbe-phase-2, channel_id has no consumer; revert the field, the api4 validation, the app.RewriteMessage parameter, and the corresponding webapp client + hook plumbing. * [MM-68555] MBE Phase 5: Channel-guard enforcement + two-phase dispatch (#36473) * phase 5 * Bake plugin counter-file paths into source instead of env vars t.Setenv panics when an ancestor test calls t.Parallel, so the two channel-guard tests broke under ENABLE_FULLY_PARALLEL_TESTS in CI. Build each plugin source per-subtest with its temp file path embedded as a Go literal — same pattern as TestPluginUploadsAPI. * Remove guarded helpers and tests for dropped hooks (phase 5) The runGuardedRecapWillBeProcessed and runGuardedMessageWillBeRewrittenByAI helpers were never wired (their app-layer call sites were already removed in the phase-4 cleanup), and the corresponding sub-tests across panic / allow / reject / partial plugins reference hooks that no longer exist. * [MM-68405] MBE Phase 6: fire MessagesWillBeConsumed on the edit path (#36475) --------- --------- --------- --------- * rebase onto master --------- Co-authored-by: Hanzo Dev <[email protected]>
565 lines
19 KiB
Go
565 lines
19 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make email-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
io "io"
|
|
|
|
model "github.com/mattermost/mattermost/server/public/model"
|
|
i18n "github.com/mattermost/mattermost/server/public/shared/i18n"
|
|
request "github.com/mattermost/mattermost/server/public/shared/request"
|
|
store "github.com/mattermost/mattermost/server/v8/channels/store"
|
|
templates "github.com/mattermost/mattermost/server/v8/platform/shared/templates"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// ServiceInterface is an autogenerated mock type for the ServiceInterface type
|
|
type ServiceInterface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// AddNotificationEmailToBatch provides a mock function with given fields: user, post, team
|
|
func (_m *ServiceInterface) AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError {
|
|
ret := _m.Called(user, post, team)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddNotificationEmailToBatch")
|
|
}
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(*model.User, *model.Post, *model.Team) *model.AppError); ok {
|
|
r0 = rf(user, post, team)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// CreateVerifyEmailToken provides a mock function with given fields: userID, newEmail
|
|
func (_m *ServiceInterface) CreateVerifyEmailToken(userID string, newEmail string) (*model.Token, error) {
|
|
ret := _m.Called(userID, newEmail)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateVerifyEmailToken")
|
|
}
|
|
|
|
var r0 *model.Token
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) (*model.Token, error)); ok {
|
|
return rf(userID, newEmail)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) *model.Token); ok {
|
|
r0 = rf(userID, newEmail)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Token)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(userID, newEmail)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GenerateHyperlinkForChannels provides a mock function with given fields: postMessage, teamName, teamURL
|
|
func (_m *ServiceInterface) GenerateHyperlinkForChannels(postMessage string, teamName string, teamURL string) (string, error) {
|
|
ret := _m.Called(postMessage, teamName, teamURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GenerateHyperlinkForChannels")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string) (string, error)); ok {
|
|
return rf(postMessage, teamName, teamURL)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, string) string); ok {
|
|
r0 = rf(postMessage, teamName, teamURL)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
|
r1 = rf(postMessage, teamName, teamURL)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetMessageForNotification provides a mock function with given fields: post, teamName, siteUrl, translateFunc
|
|
func (_m *ServiceInterface) GetMessageForNotification(post *model.Post, teamName string, siteUrl string, translateFunc i18n.TranslateFunc) string {
|
|
ret := _m.Called(post, teamName, siteUrl, translateFunc)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetMessageForNotification")
|
|
}
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func(*model.Post, string, string, i18n.TranslateFunc) string); ok {
|
|
r0 = rf(post, teamName, siteUrl, translateFunc)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// InitEmailBatching provides a mock function with no fields
|
|
func (_m *ServiceInterface) InitEmailBatching() {
|
|
_m.Called()
|
|
}
|
|
|
|
// NewEmailTemplateData provides a mock function with given fields: locale
|
|
func (_m *ServiceInterface) NewEmailTemplateData(locale string) templates.Data {
|
|
ret := _m.Called(locale)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for NewEmailTemplateData")
|
|
}
|
|
|
|
var r0 templates.Data
|
|
if rf, ok := ret.Get(0).(func(string) templates.Data); ok {
|
|
r0 = rf(locale)
|
|
} else {
|
|
r0 = ret.Get(0).(templates.Data)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendChangeUsernameEmail provides a mock function with given fields: newUsername, _a1, locale, siteURL
|
|
func (_m *ServiceInterface) SendChangeUsernameEmail(newUsername string, _a1 string, locale string, siteURL string) error {
|
|
ret := _m.Called(newUsername, _a1, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendChangeUsernameEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok {
|
|
r0 = rf(newUsername, _a1, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendCloudWelcomeEmail provides a mock function with given fields: userEmail, locale, teamInviteID, workSpaceName, dns, siteURL
|
|
func (_m *ServiceInterface) SendCloudWelcomeEmail(userEmail string, locale string, teamInviteID string, workSpaceName string, dns string, siteURL string) error {
|
|
ret := _m.Called(userEmail, locale, teamInviteID, workSpaceName, dns, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendCloudWelcomeEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string, string, string) error); ok {
|
|
r0 = rf(userEmail, locale, teamInviteID, workSpaceName, dns, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendDeactivateAccountEmail provides a mock function with given fields: _a0, locale, siteURL
|
|
func (_m *ServiceInterface) SendDeactivateAccountEmail(_a0 string, locale string, siteURL string) error {
|
|
ret := _m.Called(_a0, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendDeactivateAccountEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
|
|
r0 = rf(_a0, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendEmailChangeEmail provides a mock function with given fields: oldEmail, newEmail, locale, siteURL
|
|
func (_m *ServiceInterface) SendEmailChangeEmail(oldEmail string, newEmail string, locale string, siteURL string) error {
|
|
ret := _m.Called(oldEmail, newEmail, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendEmailChangeEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok {
|
|
r0 = rf(oldEmail, newEmail, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendEmailChangeVerifyEmail provides a mock function with given fields: newUserEmail, locale, siteURL, token
|
|
func (_m *ServiceInterface) SendEmailChangeVerifyEmail(newUserEmail string, locale string, siteURL string, token string) error {
|
|
ret := _m.Called(newUserEmail, locale, siteURL, token)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendEmailChangeVerifyEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok {
|
|
r0 = rf(newUserEmail, locale, siteURL, token)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendGuestInviteEmails provides a mock function with given fields: rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin, isGuestMagicLink
|
|
func (_m *ServiceInterface) SendGuestInviteEmails(rctx request.CTX, team *model.Team, channels []*model.Channel, senderName string, senderUserId string, senderProfileImage []byte, invites []string, siteURL string, message string, errorWhenNotSent bool, isSystemAdmin bool, isFirstAdmin bool, isGuestMagicLink bool) error {
|
|
ret := _m.Called(rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin, isGuestMagicLink)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendGuestInviteEmails")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Team, []*model.Channel, string, string, []byte, []string, string, string, bool, bool, bool, bool) error); ok {
|
|
r0 = rf(rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin, isGuestMagicLink)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendIPFiltersChangedEmail provides a mock function with given fields: _a0, userWhoChangedFilter, siteURL, portalURL, locale, isWorkspaceOwner
|
|
func (_m *ServiceInterface) SendIPFiltersChangedEmail(_a0 string, userWhoChangedFilter *model.User, siteURL string, portalURL string, locale string, isWorkspaceOwner bool) error {
|
|
ret := _m.Called(_a0, userWhoChangedFilter, siteURL, portalURL, locale, isWorkspaceOwner)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendIPFiltersChangedEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, *model.User, string, string, string, bool) error); ok {
|
|
r0 = rf(_a0, userWhoChangedFilter, siteURL, portalURL, locale, isWorkspaceOwner)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendInviteEmails provides a mock function with given fields: rctx, team, senderName, senderUserId, invites, siteURL, reminderData, errorWhenNotSent, isSystemAdmin, isFirstAdmin
|
|
func (_m *ServiceInterface) SendInviteEmails(rctx request.CTX, team *model.Team, senderName string, senderUserId string, invites []string, siteURL string, reminderData *model.TeamInviteReminderData, errorWhenNotSent bool, isSystemAdmin bool, isFirstAdmin bool) error {
|
|
ret := _m.Called(rctx, team, senderName, senderUserId, invites, siteURL, reminderData, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendInviteEmails")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Team, string, string, []string, string, *model.TeamInviteReminderData, bool, bool, bool) error); ok {
|
|
r0 = rf(rctx, team, senderName, senderUserId, invites, siteURL, reminderData, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendInviteEmailsToTeamAndChannels provides a mock function with given fields: rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin
|
|
func (_m *ServiceInterface) SendInviteEmailsToTeamAndChannels(rctx request.CTX, team *model.Team, channels []*model.Channel, senderName string, senderUserId string, senderProfileImage []byte, invites []string, siteURL string, reminderData *model.TeamInviteReminderData, message string, errorWhenNotSent bool, isSystemAdmin bool, isFirstAdmin bool) ([]*model.EmailInviteWithError, error) {
|
|
ret := _m.Called(rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendInviteEmailsToTeamAndChannels")
|
|
}
|
|
|
|
var r0 []*model.EmailInviteWithError
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) ([]*model.EmailInviteWithError, error)); ok {
|
|
return rf(rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) []*model.EmailInviteWithError); ok {
|
|
r0 = rf(rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.EmailInviteWithError)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) error); ok {
|
|
r1 = rf(rctx, team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SendLicenseUpForRenewalEmail provides a mock function with given fields: _a0, locale, daysToExpiration
|
|
func (_m *ServiceInterface) SendLicenseUpForRenewalEmail(_a0 string, locale string, daysToExpiration int) error {
|
|
ret := _m.Called(_a0, locale, daysToExpiration)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendLicenseUpForRenewalEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, int) error); ok {
|
|
r0 = rf(_a0, locale, daysToExpiration)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendMagicLinkEmailSelfService provides a mock function with given fields: rctx, invite, siteURL
|
|
func (_m *ServiceInterface) SendMagicLinkEmailSelfService(rctx request.CTX, invite string, siteURL string) error {
|
|
ret := _m.Called(rctx, invite, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendMagicLinkEmailSelfService")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) error); ok {
|
|
r0 = rf(rctx, invite, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendMailWithEmbeddedFiles provides a mock function with given fields: to, subject, htmlBody, embeddedFiles, messageID, inReplyTo, references, category
|
|
func (_m *ServiceInterface) SendMailWithEmbeddedFiles(to string, subject string, htmlBody string, embeddedFiles map[string]io.Reader, messageID string, inReplyTo string, references string, category string) error {
|
|
ret := _m.Called(to, subject, htmlBody, embeddedFiles, messageID, inReplyTo, references, category)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendMailWithEmbeddedFiles")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, map[string]io.Reader, string, string, string, string) error); ok {
|
|
r0 = rf(to, subject, htmlBody, embeddedFiles, messageID, inReplyTo, references, category)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendMfaChangeEmail provides a mock function with given fields: _a0, activated, locale, siteURL
|
|
func (_m *ServiceInterface) SendMfaChangeEmail(_a0 string, activated bool, locale string, siteURL string) error {
|
|
ret := _m.Called(_a0, activated, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendMfaChangeEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, bool, string, string) error); ok {
|
|
r0 = rf(_a0, activated, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendNotificationMail provides a mock function with given fields: to, subject, htmlBody
|
|
func (_m *ServiceInterface) SendNotificationMail(to string, subject string, htmlBody string) error {
|
|
ret := _m.Called(to, subject, htmlBody)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendNotificationMail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
|
|
r0 = rf(to, subject, htmlBody)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendPasswordChangeEmail provides a mock function with given fields: _a0, method, locale, siteURL
|
|
func (_m *ServiceInterface) SendPasswordChangeEmail(_a0 string, method string, locale string, siteURL string) error {
|
|
ret := _m.Called(_a0, method, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendPasswordChangeEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok {
|
|
r0 = rf(_a0, method, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendPasswordResetEmail provides a mock function with given fields: _a0, token, locale, siteURL
|
|
func (_m *ServiceInterface) SendPasswordResetEmail(_a0 string, token *model.Token, locale string, siteURL string) (bool, error) {
|
|
ret := _m.Called(_a0, token, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendPasswordResetEmail")
|
|
}
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, *model.Token, string, string) (bool, error)); ok {
|
|
return rf(_a0, token, locale, siteURL)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, *model.Token, string, string) bool); ok {
|
|
r0 = rf(_a0, token, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, *model.Token, string, string) error); ok {
|
|
r1 = rf(_a0, token, locale, siteURL)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SendRemoveExpiredLicenseEmail provides a mock function with given fields: _a0, locale
|
|
func (_m *ServiceInterface) SendRemoveExpiredLicenseEmail(_a0 string, locale string) error {
|
|
ret := _m.Called(_a0, locale)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendRemoveExpiredLicenseEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(_a0, locale)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendSignInChangeEmail provides a mock function with given fields: _a0, method, locale, siteURL
|
|
func (_m *ServiceInterface) SendSignInChangeEmail(_a0 string, method string, locale string, siteURL string) error {
|
|
ret := _m.Called(_a0, method, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendSignInChangeEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok {
|
|
r0 = rf(_a0, method, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendUserAccessTokenAddedEmail provides a mock function with given fields: _a0, locale, siteURL
|
|
func (_m *ServiceInterface) SendUserAccessTokenAddedEmail(_a0 string, locale string, siteURL string) error {
|
|
ret := _m.Called(_a0, locale, siteURL)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendUserAccessTokenAddedEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
|
|
r0 = rf(_a0, locale, siteURL)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendVerifyEmail provides a mock function with given fields: userEmail, locale, siteURL, token, redirect
|
|
func (_m *ServiceInterface) SendVerifyEmail(userEmail string, locale string, siteURL string, token string, redirect string) error {
|
|
ret := _m.Called(userEmail, locale, siteURL, token, redirect)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendVerifyEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string, string) error); ok {
|
|
r0 = rf(userEmail, locale, siteURL, token, redirect)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SendWelcomeEmail provides a mock function with given fields: userID, _a1, verified, disableWelcomeEmail, locale, siteURL, redirect
|
|
func (_m *ServiceInterface) SendWelcomeEmail(userID string, _a1 string, verified bool, disableWelcomeEmail bool, locale string, siteURL string, redirect string) error {
|
|
ret := _m.Called(userID, _a1, verified, disableWelcomeEmail, locale, siteURL, redirect)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendWelcomeEmail")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, bool, bool, string, string, string) error); ok {
|
|
r0 = rf(userID, _a1, verified, disableWelcomeEmail, locale, siteURL, redirect)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SetStore provides a mock function with given fields: st
|
|
func (_m *ServiceInterface) SetStore(st store.Store) {
|
|
_m.Called(st)
|
|
}
|
|
|
|
// Stop provides a mock function with no fields
|
|
func (_m *ServiceInterface) Stop() {
|
|
_m.Called()
|
|
}
|
|
|
|
// NewServiceInterface creates a new instance of ServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewServiceInterface(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *ServiceInterface {
|
|
mock := &ServiceInterface{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|