Mm 16292 support command overrides (#14951)
* Supporing plugins that override built-in commands. * Test. * Fix test. * Fix override order for command autocomplete. * Fix test copy paste errors Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f5be738923
Коммит
3e9ec51890
@@ -90,10 +90,15 @@ func TestExecuteCommand(t *testing.T) {
|
||||
|
||||
for TestCase, result := range TestCases {
|
||||
args := &model.CommandArgs{
|
||||
Command: TestCase,
|
||||
T: func(s string, args ...interface{}) string { return s },
|
||||
Command: TestCase,
|
||||
TeamId: th.BasicTeam.Id,
|
||||
ChannelId: th.BasicChannel.Id,
|
||||
UserId: th.BasicUser.Id,
|
||||
T: func(s string, args ...interface{}) string { return s },
|
||||
}
|
||||
resp, _ := th.App.ExecuteCommand(args)
|
||||
resp, err := th.App.ExecuteCommand(args)
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
|
||||
assert.Equal(t, resp.Text, result)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user