summaryrefslogtreecommitdiffstats
path: root/plugin/plugintest/hooks.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/plugintest/hooks.go')
-rw-r--r--plugin/plugintest/hooks.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugin/plugintest/hooks.go b/plugin/plugintest/hooks.go
new file mode 100644
index 000000000..057c705c9
--- /dev/null
+++ b/plugin/plugintest/hooks.go
@@ -0,0 +1,21 @@
+package plugintest
+
+import (
+ "github.com/stretchr/testify/mock"
+
+ "github.com/mattermost/platform/plugin"
+)
+
+type Hooks struct {
+ mock.Mock
+}
+
+var _ plugin.Hooks = (*Hooks)(nil)
+
+func (m *Hooks) OnActivate(api plugin.API) error {
+ return m.Called(api).Error(0)
+}
+
+func (m *Hooks) OnDeactivate() error {
+ return m.Called().Error(0)
+}