From 808542bed0d0a0e2b996731601fae91798255bba Mon Sep 17 00:00:00 2001 From: jaedle Date: Mon, 4 Mar 2019 12:13:13 +0100 Subject: [PATCH] remove unnecassry test for multiple summaries --- task_test.go | 9 +-------- testdata/summary/task-with-summary.txt | 6 ++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/task_test.go b/task_test.go index 4aa6db0d..e2278dc5 100644 --- a/task_test.go +++ b/task_test.go @@ -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 { diff --git a/testdata/summary/task-with-summary.txt b/testdata/summary/task-with-summary.txt index c01eba06..0c10fba2 100644 --- a/testdata/summary/task-with-summary.txt +++ b/testdata/summary/task-with-summary.txt @@ -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'