summaryrefslogtreecommitdiffstats
path: root/plugin/plugintest
diff options
context:
space:
mode:
authorDaniel Hodan <daniel.hodan@czertbytes.de>2018-10-17 16:37:52 +0200
committerJesse Hallam <jesse.hallam@gmail.com>2018-10-17 10:37:52 -0400
commite8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235 (patch)
tree4c82fde308452da5f591eec5dc6d076fae7c5756 /plugin/plugintest
parent722675983107d0a8d5004bc1e076962786d603f0 (diff)
downloadchat-e8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235.tar.gz
chat-e8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235.tar.bz2
chat-e8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235.zip
GH-9607: Add GetTeamsForUser to plugin API (#9644)
* add GetTeamsForUser to plugin api * Add version comment, fix comment typo
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 d17c9dc5c..066cdfa7e 100644
--- a/plugin/plugintest/api.go
+++ b/plugin/plugintest/api.go
@@ -988,6 +988,31 @@ func (_m *API) GetTeams() ([]*model.Team, *model.AppError) {
return r0, r1
}
+// GetTeamsForUser provides a mock function with given fields: userId
+func (_m *API) GetTeamsForUser(userId string) ([]*model.Team, *model.AppError) {
+ ret := _m.Called(userId)
+
+ var r0 []*model.Team
+ if rf, ok := ret.Get(0).(func(string) []*model.Team); ok {
+ r0 = rf(userId)
+ } else {
+ if ret.Get(0) != nil {
+ r0 = ret.Get(0).([]*model.Team)
+ }
+ }
+
+ var r1 *model.AppError
+ if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
+ r1 = rf(userId)
+ } else {
+ if ret.Get(1) != nil {
+ r1 = ret.Get(1).(*model.AppError)
+ }
+ }
+
+ return r0, r1
+}
+
// GetUser provides a mock function with given fields: userId
func (_m *API) GetUser(userId string) (*model.User, *model.AppError) {
ret := _m.Called(userId)