INNER CODE UNIT · Go

TestBatchDryRunWithKeys

miniscruff/changie · cmd/batch_test.go:276

func TestBatchDryRunWithKeys(t *testing.T) {
	cfg := batchTestConfig()
	cfg.Kinds[0].Label = ":fire: Added"
	cfg.Kinds[0].Key = "added"
	then.WithTempDirConfig(t, cfg)

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

	var builder strings.Builder

	batch.SetOut(&builder)
	writeChangeFile(t, cfg, &core.Change{Kind: "added", Body: "D"})
	writeChangeFile(t, cfg, &core.Change{Kind: "added", Body: "E"})
	writeChangeFile(t, cfg, &core.Change{Kind: "removed", Body: "F"})

	err := batch.Run(batch.Command, []string{"v0.2.0"})
	then.Nil(t, err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…