command/output: Update test since we now allow printing everything

This commit is contained in:
Radek Simko 2015-08-03 12:44:41 +01:00
parent 85d1d15d81
commit 382c0ba23d
1 changed files with 10 additions and 2 deletions

View File

@ -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) {