diff options
author | Hanzei <16541325+hanzei@users.noreply.github.com> | 2018-10-15 16:04:22 +0200 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2018-10-15 10:04:22 -0400 |
commit | c1e5fff56534387864565d7c910d49e11a3add4a (patch) | |
tree | 6c6cddc3f747a95f186a2e1cbb3a745eb750271f /plugin/plugintest | |
parent | 0267a1f76e48ae833a4f951c82e69db59d39b314 (diff) | |
download | chat-c1e5fff56534387864565d7c910d49e11a3add4a.tar.gz chat-c1e5fff56534387864565d7c910d49e11a3add4a.tar.bz2 chat-c1e5fff56534387864565d7c910d49e11a3add4a.zip |
Add GetPostsSince() to plugin API (#9649)
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 c0302c1cf..2f2b8bc8c 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -649,6 +649,31 @@ func (_m *API) GetPostsForChannel(channelId string, page int, perPage int) (*mod return r0, r1 } +// GetPostsSince provides a mock function with given fields: channelId, time +func (_m *API) GetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError) { + ret := _m.Called(channelId, time) + + var r0 *model.PostList + if rf, ok := ret.Get(0).(func(string, int64) *model.PostList); ok { + r0 = rf(channelId, time) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.PostList) + } + } + + var r1 *model.AppError + if rf, ok := ret.Get(1).(func(string, int64) *model.AppError); ok { + r1 = rf(channelId, time) + } 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) |