MM 43666 - request bussiness email (#20315)
* MM-43666 - request bussiness email * add the newValidEmail information * revert ff model changes * remove unnecessary pointer and fix test spelling * fix unit tests and add a new one for when passing a valid email * fix go lint Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
24d9210035
Коммит
d5333603ab
@@ -25,7 +25,8 @@ type CloudInterface interface {
|
||||
|
||||
ChangeSubscription(userID, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error)
|
||||
|
||||
RequestCloudTrial(userID, subscriptionID string) (*model.Subscription, error)
|
||||
RequestCloudTrial(userID, subscriptionID, newValidBusinessEmail string) (*model.Subscription, error)
|
||||
ValidateBusinessEmail(userID, email string) error
|
||||
|
||||
// GetLicenseRenewalStatus checks on the portal whether it is possible to use token to renew a license
|
||||
GetLicenseRenewalStatus(userID, token string) error
|
||||
|
||||
@@ -247,13 +247,13 @@ func (_m *CloudInterface) InvalidateCaches() error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RequestCloudTrial provides a mock function with given fields: userID, subscriptionID
|
||||
func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string) (*model.Subscription, error) {
|
||||
ret := _m.Called(userID, subscriptionID)
|
||||
// RequestCloudTrial provides a mock function with given fields: userID, subscriptionID, newValidBusinessEmail
|
||||
func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string, newValidBusinessEmail string) (*model.Subscription, error) {
|
||||
ret := _m.Called(userID, subscriptionID, newValidBusinessEmail)
|
||||
|
||||
var r0 *model.Subscription
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Subscription); ok {
|
||||
r0 = rf(userID, subscriptionID)
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) *model.Subscription); ok {
|
||||
r0 = rf(userID, subscriptionID, newValidBusinessEmail)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Subscription)
|
||||
@@ -261,8 +261,8 @@ func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, subscriptionID)
|
||||
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
|
||||
r1 = rf(userID, subscriptionID, newValidBusinessEmail)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -329,3 +329,17 @@ func (_m *CloudInterface) UpdateSubscriptionFromHook(_a0 *model.ProductLimits, _
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// ValidateBusinessEmail provides a mock function with given fields: userID, email
|
||||
func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) error {
|
||||
ret := _m.Called(userID, email)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userID, email)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user