INNER CODE UNIT · Go
TestBatchOverrideIfForced
miniscruff/changie · cmd/batch_test.go:414
func TestBatchOverrideIfForced(t *testing.T) {
cfg := batchTestConfig()
then.WithTempDirConfig(t, cfg)
batch := NewBatch(time.Now, core.NewTemplateCache())
batch.Force = true
writeChangeFile(t, cfg, &core.Change{Kind: "added", Body: "A"})
err := batch.Run(batch.Command, []string{"v0.2.0"})
then.Nil(t, err)
writeChangeFile(t, cfg, &core.Change{Kind: "added", Body: "B"})
err = batch.Run(batch.Command, []string{"v0.2.0"})
then.Nil(t, err)
verContents := `## v0.2.0