INNER CODE UNIT · Go
TestBatchErrorBadKindFormat
miniscruff/changie · cmd/batch_test.go:500
func TestBatchErrorBadKindFormat(t *testing.T) {
cfg := batchTestConfig()
cfg.KindFormat = "bad {{...buh}}"
batch := NewBatch(time.Now, core.NewTemplateCache())
then.WithTempDirConfig(t, cfg)
writeChangeFile(t, cfg, &core.Change{Kind: "added", Body: "C"})
err := batch.Run(batch.Command, []string{"v0.2.3"})
then.NotNil(t, err)
_, err = os.Stat(filepath.Join(cfg.ChangesDir, "v0.2.3.md"))
then.Err(t, fs.ErrNotExist, err)
}
func TestBatchErrorBadComponentFormat(t *testing.T) {
cfg := batchTestConfig()
cfg.ComponentFormat = "bad {{...buh}}"