diff options
author | 2021-04-19 19:42:19 +0200 | |
---|---|---|
committer | 2021-04-19 19:42:19 +0200 | |
commit | 32c5fd987a06e11b14a4247d13187657c14adedd (patch) | |
tree | f5b787ca0f020bea5fd020925e52d3592a77a6ad /internal/media/mock_MediaHandler.go | |
parent | Api/v1/accounts (#8) (diff) | |
download | gotosocial-32c5fd987a06e11b14a4247d13187657c14adedd.tar.xz |
Api/v1/statuses (#11)
This PR adds:
Statuses
New status creation.
View existing status
Delete a status
Fave a status
Unfave a status
See who's faved a status
Media
Upload media attachment and store/retrieve it
Upload custom emoji and store/retrieve it
Fileserver
Serve files from storage
Testing
Test models, testrig -- run a GTS test instance and play around with it.
Diffstat (limited to 'internal/media/mock_MediaHandler.go')
-rw-r--r-- | internal/media/mock_MediaHandler.go | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/internal/media/mock_MediaHandler.go b/internal/media/mock_MediaHandler.go index 0299d307e..1f875557a 100644 --- a/internal/media/mock_MediaHandler.go +++ b/internal/media/mock_MediaHandler.go @@ -4,7 +4,7 @@ package media import ( mock "github.com/stretchr/testify/mock" - model "github.com/superseriousbusiness/gotosocial/internal/db/model" + gtsmodel "github.com/superseriousbusiness/gotosocial/internal/db/gtsmodel" ) // MockMediaHandler is an autogenerated mock type for the MediaHandler type @@ -12,16 +12,39 @@ type MockMediaHandler struct { mock.Mock } +// ProcessAttachment provides a mock function with given fields: img, accountID +func (_m *MockMediaHandler) ProcessAttachment(img []byte, accountID string) (*gtsmodel.MediaAttachment, error) { + ret := _m.Called(img, accountID) + + var r0 *gtsmodel.MediaAttachment + if rf, ok := ret.Get(0).(func([]byte, string) *gtsmodel.MediaAttachment); ok { + r0 = rf(img, accountID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*gtsmodel.MediaAttachment) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func([]byte, string) error); ok { + r1 = rf(img, accountID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // SetHeaderOrAvatarForAccountID provides a mock function with given fields: img, accountID, headerOrAvi -func (_m *MockMediaHandler) SetHeaderOrAvatarForAccountID(img []byte, accountID string, headerOrAvi string) (*model.MediaAttachment, error) { +func (_m *MockMediaHandler) SetHeaderOrAvatarForAccountID(img []byte, accountID string, headerOrAvi string) (*gtsmodel.MediaAttachment, error) { ret := _m.Called(img, accountID, headerOrAvi) - var r0 *model.MediaAttachment - if rf, ok := ret.Get(0).(func([]byte, string, string) *model.MediaAttachment); ok { + var r0 *gtsmodel.MediaAttachment + if rf, ok := ret.Get(0).(func([]byte, string, string) *gtsmodel.MediaAttachment); ok { r0 = rf(img, accountID, headerOrAvi) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*model.MediaAttachment) + r0 = ret.Get(0).(*gtsmodel.MediaAttachment) } } |