diff options
author | Akash Srivastava <akashsrivastava4927@gmail.com> | 2018-10-10 18:53:36 +0530 |
---|---|---|
committer | Jesse Hallam <jesse.hallam@gmail.com> | 2018-10-10 09:23:36 -0400 |
commit | bd04d7f75698c7b68434199208dc469021b823c2 (patch) | |
tree | 9ff5c93919ff1780dbab140877a19a31f6fda5a2 /plugin/plugintest/api.go | |
parent | bffcccf99de8a8f3c68cff9e39d2847f0996b67b (diff) | |
download | chat-bd04d7f75698c7b68434199208dc469021b823c2.tar.gz chat-bd04d7f75698c7b68434199208dc469021b823c2.tar.bz2 chat-bd04d7f75698c7b68434199208dc469021b823c2.zip |
Add GetPostsForChannel method to plugin API (#9557)
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
Diffstat (limited to 'plugin/plugintest/api.go')
-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 862662cf8..8240a81c9 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -599,6 +599,31 @@ func (_m *API) GetPost(postId string) (*model.Post, *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) + + var r0 *model.PostList + if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok { + r0 = rf(channelId, 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, int, int) *model.AppError); ok { + r1 = rf(channelId, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + // GetPublicChannelsForTeam provides a mock function with given fields: teamId, offset, limit func (_m *API) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) { ret := _m.Called(teamId, offset, limit) |