* Starting migration

* Migration finished

* Fix i18n

* Fix some tests

* Fix typos

* Remove overwite of http status

* Add i18n string

* Fix i18n

* fix breakages

* fix tests

Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
Этот коммит содержится в:
Agniva De Sarker
2020-07-28 10:27:24 +05:30
коммит произвёл GitHub
родитель 8f42177870
Коммит 83974d8a8d
19 изменённых файлов: 241 добавлений и 261 удалений

Просмотреть файл

@@ -15,7 +15,7 @@ type PreferenceStore struct {
}
// CleanupFlagsBatch provides a mock function with given fields: limit
func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, *model.AppError) {
func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) {
ret := _m.Called(limit)
var r0 int64
@@ -25,68 +25,60 @@ func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, *model.AppErro
r0 = ret.Get(0).(int64)
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(int64) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(int64) error); ok {
r1 = rf(limit)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// Delete provides a mock function with given fields: userId, category, name
func (_m *PreferenceStore) Delete(userId string, category string, name string) *model.AppError {
func (_m *PreferenceStore) Delete(userId string, category string, name string) error {
ret := _m.Called(userId, category, name)
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok {
var r0 error
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = rf(userId, category, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AppError)
}
r0 = ret.Error(0)
}
return r0
}
// DeleteCategory provides a mock function with given fields: userId, category
func (_m *PreferenceStore) DeleteCategory(userId string, category string) *model.AppError {
func (_m *PreferenceStore) DeleteCategory(userId string, category string) error {
ret := _m.Called(userId, category)
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(userId, category)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AppError)
}
r0 = ret.Error(0)
}
return r0
}
// DeleteCategoryAndName provides a mock function with given fields: category, name
func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) *model.AppError {
func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) error {
ret := _m.Called(category, name)
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(category, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AppError)
}
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: userId, category, name
func (_m *PreferenceStore) Get(userId string, category string, name string) (*model.Preference, *model.AppError) {
func (_m *PreferenceStore) Get(userId string, category string, name string) (*model.Preference, error) {
ret := _m.Called(userId, category, name)
var r0 *model.Preference
@@ -98,20 +90,18 @@ func (_m *PreferenceStore) Get(userId string, category string, name string) (*mo
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
r1 = rf(userId, category, name)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// GetAll provides a mock function with given fields: userId
func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, *model.AppError) {
func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, error) {
ret := _m.Called(userId)
var r0 model.Preferences
@@ -123,20 +113,18 @@ func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, *model.AppE
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userId)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// GetCategory provides a mock function with given fields: userId, category
func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Preferences, *model.AppError) {
func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Preferences, error) {
ret := _m.Called(userId, category)
var r0 model.Preferences
@@ -148,45 +136,39 @@ func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Pr
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(userId, category)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
r1 = ret.Error(1)
}
return r0, r1
}
// PermanentDeleteByUser provides a mock function with given fields: userId
func (_m *PreferenceStore) PermanentDeleteByUser(userId string) *model.AppError {
func (_m *PreferenceStore) PermanentDeleteByUser(userId string) error {
ret := _m.Called(userId)
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(userId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AppError)
}
r0 = ret.Error(0)
}
return r0
}
// Save provides a mock function with given fields: preferences
func (_m *PreferenceStore) Save(preferences *model.Preferences) *model.AppError {
func (_m *PreferenceStore) Save(preferences *model.Preferences) error {
ret := _m.Called(preferences)
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Preferences) *model.AppError); ok {
var r0 error
if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok {
r0 = rf(preferences)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AppError)
}
r0 = ret.Error(0)
}
return r0