mess about with media a bit more
This commit is contained in:
@ -3,9 +3,10 @@
|
||||
package media
|
||||
|
||||
import (
|
||||
multipart "mime/multipart"
|
||||
io "io"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
model "github.com/superseriousbusiness/gotosocial/internal/db/model"
|
||||
)
|
||||
|
||||
// MockMediaHandler is an autogenerated mock type for the MediaHandler type
|
||||
@ -13,22 +14,22 @@ type MockMediaHandler struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// SetHeaderForAccountID provides a mock function with given fields: f, id
|
||||
func (_m *MockMediaHandler) SetHeaderForAccountID(f multipart.File, id string) (*HeaderInfo, error) {
|
||||
ret := _m.Called(f, id)
|
||||
// SetHeaderOrAvatarForAccountID provides a mock function with given fields: f, accountID, headerOrAvi
|
||||
func (_m *MockMediaHandler) SetHeaderOrAvatarForAccountID(f io.Reader, accountID string, headerOrAvi string) (*model.MediaAttachment, error) {
|
||||
ret := _m.Called(f, accountID, headerOrAvi)
|
||||
|
||||
var r0 *HeaderInfo
|
||||
if rf, ok := ret.Get(0).(func(multipart.File, string) *HeaderInfo); ok {
|
||||
r0 = rf(f, id)
|
||||
var r0 *model.MediaAttachment
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, string, string) *model.MediaAttachment); ok {
|
||||
r0 = rf(f, accountID, headerOrAvi)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*HeaderInfo)
|
||||
r0 = ret.Get(0).(*model.MediaAttachment)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(multipart.File, string) error); ok {
|
||||
r1 = rf(f, id)
|
||||
if rf, ok := ret.Get(1).(func(io.Reader, string, string) error); ok {
|
||||
r1 = rf(f, accountID, headerOrAvi)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user