mattermost-plugin-cleanup-c.../server/command/command_test.go
Felipe M. 2ecbd2442d
Some checks failed
ci / test (push) Failing after 1m5s
ci / lint (push) Failing after 1m6s
ci / build (push) Failing after 1m6s
release / release (push) Failing after 50s
Add Mattermost plugin for system-admin channel cleanup.
Provide a channel header menu action and /cleanup-channel slash command so system administrators can remove all messages from a channel, with admin checks enforced on both the web app and server. Configure CI and release workflows for the Forgejo runner and signed plugin bundles.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 18:46:39 +02:00

23 lines
No EOL
525 B
Go

package command
import (
"testing"
"github.com/mattermost/mattermost/server/public/model"
"github.com/stretchr/testify/require"
)
func TestHandleUnknownCommand(t *testing.T) {
handler := &Handler{
cleanup: func(userID, channelID string) (int, error) {
return 0, nil
},
}
response, err := handler.Handle(&model.CommandArgs{
Command: "/unknown",
})
require.NoError(t, err)
require.Equal(t, model.CommandResponseTypeEphemeral, response.ResponseType)
require.Contains(t, response.Text, "Unknown command")
}