leverage CheckCommand when a cmd should pass (#9944)

Using RunCommand obscures the error if, indeed, the assertion fails because the cmd fails to run.
Этот коммит содержится в:
Jesse Hallam
2018-12-05 13:51:31 -05:00
коммит произвёл Christopher Speller
родитель aba194188f
Коммит a317093467
3 изменённых файлов: 13 добавлений и 13 удалений

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

@@ -158,7 +158,7 @@ func TestDeleteCommand(t *testing.T) {
require.Nil(t, err)
assert.Equal(t, len(commands), 1)
assert.Nil(t, RunCommand(t, "command", "delete", command.Id))
CheckCommand(t, "command", "delete", command.Id)
commands, err = th.App.ListTeamCommands(team.Id)
require.Nil(t, err)
assert.Equal(t, len(commands), 0)