INNER CODE UNIT · Go

TestBatchErrorBadLatestVersion

miniscruff/changie · cmd/batch_test.go:466

func TestBatchErrorBadLatestVersion(t *testing.T) {
	cfg := batchTestConfig()
	cfg.ChangesDir = "../../opt/apt/not/real"
	then.WithTempDirConfig(t, cfg)

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

	// fail trying to read a bad directory
	err := batch.Run(batch.Command, []string{"v0.2.0"})
	then.NotNil(t, err)
}

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"})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…