github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/UserTermsOfServiceStore.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make store-mocks`. 4 5 package mocks 6 7 import ( 8 model "github.com/mattermost/mattermost-server/v5/model" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // UserTermsOfServiceStore is an autogenerated mock type for the UserTermsOfServiceStore type 13 type UserTermsOfServiceStore struct { 14 mock.Mock 15 } 16 17 // Delete provides a mock function with given fields: userId, termsOfServiceId 18 func (_m *UserTermsOfServiceStore) Delete(userId string, termsOfServiceId string) error { 19 ret := _m.Called(userId, termsOfServiceId) 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func(string, string) error); ok { 23 r0 = rf(userId, termsOfServiceId) 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 // GetByUser provides a mock function with given fields: userId 32 func (_m *UserTermsOfServiceStore) GetByUser(userId string) (*model.UserTermsOfService, error) { 33 ret := _m.Called(userId) 34 35 var r0 *model.UserTermsOfService 36 if rf, ok := ret.Get(0).(func(string) *model.UserTermsOfService); ok { 37 r0 = rf(userId) 38 } else { 39 if ret.Get(0) != nil { 40 r0 = ret.Get(0).(*model.UserTermsOfService) 41 } 42 } 43 44 var r1 error 45 if rf, ok := ret.Get(1).(func(string) error); ok { 46 r1 = rf(userId) 47 } else { 48 r1 = ret.Error(1) 49 } 50 51 return r0, r1 52 } 53 54 // Save provides a mock function with given fields: userTermsOfService 55 func (_m *UserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfService) (*model.UserTermsOfService, error) { 56 ret := _m.Called(userTermsOfService) 57 58 var r0 *model.UserTermsOfService 59 if rf, ok := ret.Get(0).(func(*model.UserTermsOfService) *model.UserTermsOfService); ok { 60 r0 = rf(userTermsOfService) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).(*model.UserTermsOfService) 64 } 65 } 66 67 var r1 error 68 if rf, ok := ret.Get(1).(func(*model.UserTermsOfService) error); ok { 69 r1 = rf(userTermsOfService) 70 } else { 71 r1 = ret.Error(1) 72 } 73 74 return r0, r1 75 }