package vaultik_test import ( "bytes" "testing" "github.com/stretchr/testify/require" "sneak.berlin/go/vaultik/internal/ui" "sneak.berlin/go/vaultik/internal/vaultik" ) // TestShowInfo_QuietSuppressesReport checks that --quiet silences the // whole info report. The report is human-facing status, not a scriptable // value, so under --quiet the command produces nothing (and touches none // of its dependencies, which is why this minimal instance suffices). func TestShowInfo_QuietSuppressesReport(t *testing.T) { t.Parallel() var out bytes.Buffer v := &vaultik.Vaultik{ Stdout: &out, UI: ui.NewWithColor(&out, false), } v.UI.SetQuiet(true) require.NoError(t, v.ShowInfo()) require.Empty(t, out.String(), "the info report must be suppressed under --quiet") }