diff options
author | Hanzei <16541325+hanzei@users.noreply.github.com> | 2018-10-15 19:18:23 +0200 |
---|---|---|
committer | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-10-15 19:18:23 +0200 |
commit | 71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed (patch) | |
tree | c3a313e917f75c79a010a97e2887d0e50851808a /plugin/plugintest | |
parent | a35a9b9b2d9720a3753c96a4a3a36d437e518140 (diff) | |
download | chat-71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed.tar.gz chat-71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed.tar.bz2 chat-71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed.zip |
Add GetPostsBefore() to plugin API (#9651)
Diffstat (limited to 'plugin/plugintest')
-rw-r--r-- | plugin/plugintest/api.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go index a65b3a5d7..0e9402931 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -649,6 +649,31 @@ func (_m *API) GetPostThread(postId string) (*model.PostList, *model.AppError) { return r0, r1 } +// GetPostsBefore provides a mock function with given fields: channelId, postId, page, perPage +func (_m *API) GetPostsBefore(channelId string, postId string, page int, perPage int) (*model.PostList, *model.AppError) { + ret := _m.Called(channelId, postId, page, perPage) + + var r0 *model.PostList + if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok { + r0 = rf(channelId, postId, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + var r1 *model.AppError + if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { + r1 = rf(channelId, postId, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + // GetPostsForChannel provides a mock function with given fields: channelId, page, perPage func (_m *API) GetPostsForChannel(channelId string, page int, perPage int) (*model.PostList, *model.AppError) { ret := _m.Called(channelId, page, perPage) |