mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
35 lines
635 B
Go
35 lines
635 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
package plugintest
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/stretchr/testify/mock"
|
|
|
|
"github.com/mattermost/mattermost-server/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)
|
|
}
|
|
|
|
func (m *Hooks) OnConfigurationChange() error {
|
|
return m.Called().Error(0)
|
|
}
|
|
|
|
func (m *Hooks) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
m.Called(w, r)
|
|
}
|