1
0
mirror of https://github.com/go-task/task.git synced 2025-01-04 03:48:02 +02:00

remove unnecassry test for multiple summaries

This commit is contained in:
jaedle 2019-03-04 12:13:13 +01:00
parent 93bfd57856
commit 808542bed0
2 changed files with 7 additions and 8 deletions

View File

@ -566,15 +566,8 @@ func TestSummary(t *testing.T) {
Silent: true,
}
assert.NoError(t, e.Setup())
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-summary"}))
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-summary"}, taskfile.Call{Task: "other-task-with-summary"}))
assert.Equal(t, readTestFixture(t, dir, "task-with-summary.txt"), buff.String())
buff.Reset()
const firstTask = "other-task-with-summary"
const secondTask = "task-with-summary"
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: firstTask}, taskfile.Call{Task: secondTask}))
assert.Contains(t, buff.String(), "summary of "+firstTask)
assert.Contains(t, buff.String(), "summary of "+secondTask)
}
func readTestFixture(t *testing.T, dir string, file string) string {

View File

@ -12,3 +12,9 @@ commands:
- echo 'task-with-summary was executed'
- echo 'another command'
- exit 0
task: other-task-with-summary
summary of other-task-with-summary
commands:
- echo 'other-task-with-summary was executed'