From dc946f85168d6b375e185f53cb1a02636be6d7eb Mon Sep 17 00:00:00 2001 From: Daniel Hodan Date: Thu, 18 Oct 2018 15:11:30 +0200 Subject: GH-9635: Add GetUsersByUsernames to plugin API (#9647) * add GetUsersByUsernames to plugin api * fix GetUsersByUsernames comment --- plugin/plugintest/api.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'plugin/plugintest/api.go') diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go index 78e361e0f..4ef879bad 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -1161,6 +1161,31 @@ func (_m *API) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.A return r0, r1 } +// GetUsersByUsernames provides a mock function with given fields: usernames +func (_m *API) GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError) { + ret := _m.Called(usernames) + + var r0 []*model.User + if rf, ok := ret.Get(0).(func([]string) []*model.User); ok { + r0 = rf(usernames) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*model.User) + } + } + + var r1 *model.AppError + if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { + r1 = rf(usernames) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*model.AppError) + } + } + + 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) -- cgit v1.2.3-1-g7c22