INNER CODE UNIT · Go
TestBatchErrorBadChanges
miniscruff/changie · cmd/batch_test.go:388
func TestBatchErrorBadChanges(t *testing.T) {
cfg := batchTestConfig()
then.WithTempDirConfig(t, cfg)
batch := NewBatch(time.Now, core.NewTemplateCache())
aVer := []byte("not a valid change")
then.WriteFile(t, aVer, cfg.ChangesDir, cfg.UnreleasedDir, "a.yaml")
err := batch.Run(batch.Command, []string{"v0.1.1"})
then.NotNil(t, err)
}
func TestBatchErrorNoChangesAndNotAllowed(t *testing.T) {
cfg := batchTestConfig()
then.WithTempDirConfig(t, cfg)
err := os.MkdirAll(filepath.Join("news", "future"), 0777)
then.Nil(t, err)