test(drive): cover invalid download format
This commit is contained in:
parent
c595f934bb
commit
dc45fe6db9
@ -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,
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user