command/output: Update test since we now allow printing everything
This commit is contained in:
parent
85d1d15d81
commit
382c0ba23d
|
@ -162,6 +162,7 @@ func TestOutput_blank(t *testing.T) {
|
|||
Path: []string{"root"},
|
||||
Outputs: map[string]string{
|
||||
"foo": "bar",
|
||||
"name": "john-doe",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -181,9 +182,16 @@ func TestOutput_blank(t *testing.T) {
|
|||
"-state", statePath,
|
||||
"",
|
||||
}
|
||||
if code := c.Run(args); code != 1 {
|
||||
|
||||
if code := c.Run(args); code != 0 {
|
||||
t.Fatalf("bad: \n%s", ui.ErrorWriter.String())
|
||||
}
|
||||
|
||||
expectedOutput := "foo = bar\nname = john-doe\n"
|
||||
output := ui.OutputWriter.String()
|
||||
if output != expectedOutput {
|
||||
t.Fatalf("Expected output: %#v\ngiven: %#v", expectedOutput, output)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOutput_manyArgs(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue