From 3087f0bc4c81a11ab3ecc08d3a37ea3d0dfda390 Mon Sep 17 00:00:00 2001 From: Daniel Hodan Date: Mon, 15 Oct 2018 18:24:26 +0200 Subject: GH-9609: Add GetUsersInTeam in plugin API (#9642) * add GetUsersInTeam in plugin api * remove extra space in comment --- plugin/plugintest/api.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'plugin/plugintest') diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go index 9040f994e..b915a6105 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -1038,6 +1038,31 @@ func (_m *API) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.A return r0, r1 } +// GetUsersInTeam provides a mock function with given fields: teamId, page, perPage +func (_m *API) GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError) { + ret := _m.Called(teamId, page, perPage) + + var r0 []*model.User + if rf, ok := ret.Get(0).(func(string, int, int) []*model.User); ok { + r0 = rf(teamId, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + var r1 *model.AppError + if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { + r1 = rf(teamId, page, perPage) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + return r0, r1 +} + // HasPermissionTo provides a mock function with given fields: userId, permission func (_m *API) HasPermissionTo(userId string, permission *model.Permission) bool { ret := _m.Called(userId, permission) -- cgit v1.2.3-1-g7c22