summaryrefslogtreecommitdiffstats
path: root/plugin/plugintest
diff options
context:
space:
mode:
authorDaniel Hodan <daniel.hodan@czertbytes.de>2018-10-18 15:11:30 +0200
committerJoram Wilander <jwawilander@gmail.com>2018-10-18 09:11:30 -0400
commitdc946f85168d6b375e185f53cb1a02636be6d7eb (patch)
tree54337e10e5a7f65dd1927e3303ad2419fccfde76 /plugin/plugintest
parent3bc89083fca64a1d096cc897f13d0a9b68433a8f (diff)
downloadchat-dc946f85168d6b375e185f53cb1a02636be6d7eb.tar.gz
chat-dc946f85168d6b375e185f53cb1a02636be6d7eb.tar.bz2
chat-dc946f85168d6b375e185f53cb1a02636be6d7eb.zip
GH-9635: Add GetUsersByUsernames to plugin API (#9647)
* add GetUsersByUsernames to plugin api * fix GetUsersByUsernames comment
Diffstat (limited to 'plugin/plugintest')
-rw-r--r--plugin/plugintest/api.go25
1 files changed, 25 insertions, 0 deletions
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)