Skip to content

Commit

Permalink
Merge pull request #905 from rsteube/test-fix-context
Browse files Browse the repository at this point in the history
fix test
  • Loading branch information
rsteube authored Aug 23, 2023
2 parents 87897c8 + a296c10 commit 375cab9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,11 @@ func TestActionMessageSuppress(t *testing.T) {
}

func TestActionExecCommand(t *testing.T) {
context := NewContext()
context.Value = "docs/"
assertEqual(t,
ActionMessage("go unknown: unknown command").Invoke(Context{}).Prefix("docs/"),
ActionExecCommand("go", "unknown")(func(output []byte) Action { return ActionValues() }).Invoke(Context{Value: "docs/"}),
ActionMessage("go unknown: unknown command").Invoke(NewContext()).Prefix("docs/"),
ActionExecCommand("go", "unknown")(func(output []byte) Action { return ActionValues() }).Invoke(context),
)

assertEqual(t,
Expand Down

0 comments on commit 375cab9

Please sign in to comment.