summaryrefslogtreecommitdiffstats
path: root/plugin/plugintest
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/plugintest')
-rw-r--r--plugin/plugintest/api.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go
index 75174a9a6..8f9f4a604 100644
--- a/plugin/plugintest/api.go
+++ b/plugin/plugintest/api.go
@@ -223,6 +223,16 @@ func (m *API) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppE
return channelOut, err
}
+func (m *API) AddChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError) {
+ ret := m.Called(channelId, userId)
+ if f, ok := ret.Get(0).(func(_, _ string) (*model.ChannelMember, *model.AppError)); ok {
+ return f(channelId, userId)
+ }
+ member, _ := ret.Get(0).(*model.ChannelMember)
+ err, _ := ret.Get(1).(*model.AppError)
+ return member, err
+}
+
func (m *API) GetChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError) {
ret := m.Called(channelId, userId)
if f, ok := ret.Get(0).(func(_, _ string) (*model.ChannelMember, *model.AppError)); ok {
@@ -233,6 +243,35 @@ func (m *API) GetChannelMember(channelId, userId string) (*model.ChannelMember,
return member, err
}
+func (m *API) UpdateChannelMemberRoles(channelId, userId, newRoles string) (*model.ChannelMember, *model.AppError) {
+ ret := m.Called(channelId, userId, newRoles)
+ if f, ok := ret.Get(0).(func(_, _, _ string) (*model.ChannelMember, *model.AppError)); ok {
+ return f(channelId, userId, newRoles)
+ }
+ member, _ := ret.Get(0).(*model.ChannelMember)
+ err, _ := ret.Get(1).(*model.AppError)
+ return member, err
+}
+
+func (m *API) UpdateChannelMemberNotifications(channelId, userId string, notifications map[string]string) (*model.ChannelMember, *model.AppError) {
+ ret := m.Called(channelId, userId, notifications)
+ if f, ok := ret.Get(0).(func(_, _ string, _ map[string]string) (*model.ChannelMember, *model.AppError)); ok {
+ return f(channelId, userId, notifications)
+ }
+ member, _ := ret.Get(0).(*model.ChannelMember)
+ err, _ := ret.Get(1).(*model.AppError)
+ return member, err
+}
+
+func (m *API) DeleteChannelMember(channelId, userId string) *model.AppError {
+ ret := m.Called(channelId, userId)
+ if f, ok := ret.Get(0).(func(_, _ string) *model.AppError); ok {
+ return f(channelId, userId)
+ }
+ err, _ := ret.Get(0).(*model.AppError)
+ return err
+}
+
func (m *API) CreatePost(post *model.Post) (*model.Post, *model.AppError) {
ret := m.Called(post)
if f, ok := ret.Get(0).(func(*model.Post) (*model.Post, *model.AppError)); ok {