From 4c17bdff1bb871fb31520b7b547f584c53ed854f Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 8 Dec 2017 13:55:41 -0600 Subject: Add plugin slash command support (#7941) * add plugin slash command support * remove unused string * rebase --- plugin/plugintest/api.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'plugin/plugintest/api.go') diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go index b00542032..75174a9a6 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -30,6 +30,22 @@ func (m *API) LoadPluginConfiguration(dest interface{}) error { return ret.Error(0) } +func (m *API) RegisterCommand(command *model.Command) error { + ret := m.Called(command) + if f, ok := ret.Get(0).(func(*model.Command) error); ok { + return f(command) + } + return ret.Error(0) +} + +func (m *API) UnregisterCommand(teamId, trigger string) error { + ret := m.Called(teamId, trigger) + if f, ok := ret.Get(0).(func(string, string) error); ok { + return f(teamId, trigger) + } + return ret.Error(0) +} + func (m *API) CreateUser(user *model.User) (*model.User, *model.AppError) { ret := m.Called(user) if f, ok := ret.Get(0).(func(*model.User) (*model.User, *model.AppError)); ok { -- cgit v1.2.3-1-g7c22