From a9012ebfc5021b005a1b1693e73004c80d1a5c40 Mon Sep 17 00:00:00 2001 From: jaedle Date: Sun, 24 Feb 2019 17:28:06 +0100 Subject: [PATCH] refactoring --- internal/summary/summary_test.go | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/internal/summary/summary_test.go b/internal/summary/summary_test.go index 6191cca6..731ff693 100644 --- a/internal/summary/summary_test.go +++ b/internal/summary/summary_test.go @@ -26,10 +26,7 @@ func TestPrintsDependenciesIfPresent(t *testing.T) { summary.Print(&l, task) - assert.Contains(t, buffer.String(), "\ndependencies:\n") - assert.Contains(t, buffer.String(), "\n - dep1\n") - assert.Contains(t, buffer.String(), "\n - dep2\n") - assert.Contains(t, buffer.String(), "\n - dep3\n") + assert.Contains(t, buffer.String(), "\ndependencies:\n"+" - dep1\n"+" - dep2\n"+" - dep3\n") } func TestDoesNotPrintDependenciesIfMissing(t *testing.T) { @@ -127,18 +124,17 @@ func TestFullSummary(t *testing.T) { } func expectedOutput() string { - expected := - `task: sample-task - - line1 - line2 - line3 - - dependencies: - - dependency - - commands: - - command - ` + expected := `task: sample-task + +line1 +line2 +line3 + +dependencies: + - dependency + +commands: + - command +` return expected }