Automatic Merge
Этот коммит содержится в:
Guillermo Vayá
2026-03-20 12:30:54 +01:00
коммит произвёл GitHub
родитель 8ef7f78d8d
Коммит 532f2882d1
10 изменённых файлов: 413 добавлений и 18 удалений

Просмотреть файл

@@ -64,6 +64,21 @@ func TestMoveCommand(t *testing.T) {
retrievedCommand, err = th.App.GetCommand(command.Id)
assert.Nil(t, err)
assert.EqualValues(t, targetTeam.Id, retrievedCommand.TeamId)
// Move a command to a team where the trigger already exists should fail.
command2 := &model.Command{}
command2.CreatorId = model.NewId()
command2.Method = model.CommandMethodPost
command2.TeamId = sourceTeam.Id
command2.URL = "http://nowhere.com/"
command2.Trigger = "trigger1"
command2, err = th.App.CreateCommand(command2)
assert.Nil(t, err)
moveErr := th.App.MoveCommand(targetTeam, command2)
assert.NotNil(t, moveErr)
assert.Equal(t, "api.command.duplicate_trigger.app_error", moveErr.Id)
}
func TestCreateCommandPost(t *testing.T) {