1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

fix swapped expected and actual parameter

This commit is contained in:
jaedle
2019-02-24 14:10:46 +01:00
parent f1d83e92a7
commit 0a808b1212

View File

@@ -582,7 +582,7 @@ func TestDetails(t *testing.T) {
buff.Reset() buff.Reset()
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-details"})) assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-details"}))
assert.Equal(t, buff.String(), "task: task-with-details\n\ndetails of task-with-details - line 1\n"+"line 2\n"+"line 3\n\nCommands:\n") assert.Equal(t, "task: task-with-details\n\ndetails of task-with-details - line 1\n"+"line 2\n"+"line 3\n\nCommands:\n", buff.String())
assert.NotContains(t, buff.String(), "task-with-details was executed") assert.NotContains(t, buff.String(), "task-with-details was executed")
assert.NotContains(t, buff.String(), "dependend-task was executed") assert.NotContains(t, buff.String(), "dependend-task was executed")
@@ -590,7 +590,7 @@ func TestDetails(t *testing.T) {
buff.Reset() buff.Reset()
const noDetails = "task-without-details" const noDetails = "task-without-details"
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: noDetails})) assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: noDetails}))
assert.Equal(t, buff.String(), "task: There is no detailed description for task: "+noDetails+"\n") assert.Equal(t, "task: There is no detailed description for task: "+noDetails+"\n", buff.String())
buff.Reset() buff.Reset()
const firstTask = "other-task-with-details" const firstTask = "other-task-with-details"
@@ -601,6 +601,6 @@ func TestDetails(t *testing.T) {
buff.Reset() buff.Reset()
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-description-containing-empty-line"})) assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-description-containing-empty-line"}))
assert.Equal(t, buff.String(), "task: task-with-description-containing-empty-line\n\nFirst line followed by empty line\n\nLast Line\n\nCommands:\n") assert.Equal(t, "task: task-with-description-containing-empty-line\n\nFirst line followed by empty line\n\nLast Line\n\nCommands:\n", buff.String())
} }