INNER CODE UNIT · Go

TestBatchErrorBadConfig

miniscruff/changie · cmd/batch_test.go:478

func TestBatchErrorBadConfig(t *testing.T) {
	then.WithTempDir(t)
	then.WriteFile(t, []byte("not a proper config"), core.ConfigPaths[0])

	batch := NewBatch(time.Now, core.NewTemplateCache())
	err := batch.Run(batch.Command, []string{"v0.1.0"})
	then.NotNil(t, err)
}

func TestBatchErrorBadVersionFormat(t *testing.T) {
	cfg := batchTestConfig()
	cfg.VersionFormat = "{{bad.format}"
	then.WithTempDirConfig(t, cfg)

	batch := NewBatch(time.Now, core.NewTemplateCache())

	writeChangeFile(t, cfg, &core.Change{Kind: "removed", Body: "C"})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…