diff options
author | Hanzei <16541325+hanzei@users.noreply.github.com> | 2018-10-15 15:19:36 +0200 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2018-10-15 21:19:36 +0800 |
commit | 0267a1f76e48ae833a4f951c82e69db59d39b314 (patch) | |
tree | d58512d7ebc6a21a28fa8569431a29a9c35ccc78 /plugin/plugintest/api.go | |
parent | 5726d3919d194ea07b2fb0672d6bfa0e2c5edf9e (diff) | |
download | chat-0267a1f76e48ae833a4f951c82e69db59d39b314.tar.gz chat-0267a1f76e48ae833a4f951c82e69db59d39b314.tar.bz2 chat-0267a1f76e48ae833a4f951c82e69db59d39b314.zip |
Add GetPostThread() to plugin API (#9652)
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 c11446bda..c0302c1cf 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 } +// GetPostThread provides a mock function with given fields: postId +func (_m *API) GetPostThread(postId string) (*model.PostList, *model.AppError) { + ret := _m.Called(postId) + + var r0 *model.PostList + if rf, ok := ret.Get(0).(func(string) *model.PostList); ok { + r0 = rf(postId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + var r1 *model.AppError + if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { + r1 = rf(postId) + } 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) |