INNER CODE UNIT · Go
diff
miniscruff/changie · cmd/batch_test.go:46
diff := time.Duration(changeIncrementer) * time.Hour
change.Time = time.Date(2000, 0, 0, 0, 0, 0, 0, time.UTC).Add(diff)
}
bs, _ := yaml.Marshal(&change)
name := fmt.Sprintf("change-%d.yaml", changeIncrementer)
changeIncrementer++
if change.Filename == "" {
change.Filename = filepath.Join(cfg.ChangesDir, cfg.UnreleasedDir, name)
}
then.WriteFile(t, bs, change.Filename)
}
func TestBatchCanBatch(t *testing.T) {
cfg := batchTestConfig()
// declared path but missing is accepted