test(drive): cover invalid download format

This commit is contained in:
salmonumbrella 2026-01-31 02:44:46 -08:00 committed by Peter Steinberger
parent c595f934bb
commit dc45fe6db9

View File

@ -159,7 +159,6 @@ func TestExecute_DriveDownload_WithOutDir_JSON(t *testing.T) {
t.Fatalf("expected file at %s: %v", wantPath, statErr)
}
}
func TestExecute_DriveDownload_FormatRejected_NonGoogle(t *testing.T) {
origNew := newDriveService
origDownload := driveDownload
@ -202,13 +201,13 @@ func TestExecute_DriveDownload_FormatRejected_NonGoogle(t *testing.T) {
}, nil
}
outPath := filepath.Join(t.TempDir(), "out.pdf")
outPath := filepath.Join(t.TempDir(), "out.html")
var execErr error
_ = captureStderr(t, func() {
execErr = Execute([]string{
"--account", "a@b.com",
"drive", "download", "id1",
"--format", "pdf",
"--format", "html",
"--out", outPath,
})
})