INNER CODE UNIT · Go
TestBatchErrorBadVersion
miniscruff/changie · cmd/batch_test.go:454
func TestBatchErrorBadVersion(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{"---asdfasdf---"})
then.Err(t, core.ErrBadVersionOrPart, err)
}
func TestBatchErrorBadLatestVersion(t *testing.T) {
cfg := batchTestConfig()
cfg.ChangesDir = "../../opt/apt/not/real"
then.WithTempDirConfig(t, cfg)
batch := NewBatch(time.Now, core.NewTemplateCache())