INNER CODE UNIT · Go
TestBatchErrorStandardBadWriter
miniscruff/changie · cmd/batch_test.go:174
func TestBatchErrorStandardBadWriter(t *testing.T) {
cfg := batchTestConfig()
then.WithTempDirConfig(t, cfg)
w := then.NewErrWriter()
batch := NewBatch(time.Now, core.NewTemplateCache())
batch.writer = w
err := batch.WriteTemplate(
cfg.VersionFormat,
2, // tries to write some before lines and fails
cfg.Newlines.AfterVersion,
"v0.2.0",
)
w.Raised(t, err)
}
func TestBatchComplexVersion(t *testing.T) {