INNER CODE UNIT · Go
TestBatchErrorIfBatchExists
miniscruff/changie · cmd/batch_test.go:437
func TestBatchErrorIfBatchExists(t *testing.T) {
cfg := batchTestConfig()
then.WithTempDirConfig(t, cfg)
batch := NewBatch(time.Now, core.NewTemplateCache())
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.Err(t, errVersionExists, err)
}
func TestBatchErrorBadVersion(t *testing.T) {