(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func TestEncodeDefaultsVersion(t *testing.T) { |
| 117 | a := samplePlaybook() |
| 118 | a.FormatVersion = 0 |
| 119 | a.Provenance.FormatVersion = 0 |
| 120 | out, err := Encode(a) |
| 121 | if err != nil { |
| 122 | t.Fatalf("Encode: %v", err) |
| 123 | } |
| 124 | if !bytes.Contains(out, []byte("format_version: 1")) { |
| 125 | t.Errorf("expected default format_version: 1 in output:\n%s", out) |
| 126 | } |
| 127 | } |
nothing calls this directly
no test coverage detected