media more or less working
This commit is contained in:
@ -3,8 +3,6 @@
|
||||
package media
|
||||
|
||||
import (
|
||||
io "io"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
model "github.com/superseriousbusiness/gotosocial/internal/db/model"
|
||||
)
|
||||
@ -14,13 +12,13 @@ type MockMediaHandler struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// 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)
|
||||
// SetHeaderOrAvatarForAccountID provides a mock function with given fields: img, accountID, headerOrAvi
|
||||
func (_m *MockMediaHandler) SetHeaderOrAvatarForAccountID(img []byte, accountID string, headerOrAvi string) (*model.MediaAttachment, error) {
|
||||
ret := _m.Called(img, accountID, headerOrAvi)
|
||||
|
||||
var r0 *model.MediaAttachment
|
||||
if rf, ok := ret.Get(0).(func(io.Reader, string, string) *model.MediaAttachment); ok {
|
||||
r0 = rf(f, accountID, headerOrAvi)
|
||||
if rf, ok := ret.Get(0).(func([]byte, string, string) *model.MediaAttachment); ok {
|
||||
r0 = rf(img, accountID, headerOrAvi)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.MediaAttachment)
|
||||
@ -28,8 +26,8 @@ func (_m *MockMediaHandler) SetHeaderOrAvatarForAccountID(f io.Reader, accountID
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(io.Reader, string, string) error); ok {
|
||||
r1 = rf(f, accountID, headerOrAvi)
|
||||
if rf, ok := ret.Get(1).(func([]byte, string, string) error); ok {
|
||||
r1 = rf(img, accountID, headerOrAvi)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user