()
| 525 | |
| 526 | #[test] |
| 527 | fn test_run_without_name() { |
| 528 | let cmd = New::default(); |
| 529 | let result = cmd.run(); |
| 530 | assert!(result.is_err()); |
| 531 | match result.unwrap_err() { |
| 532 | CliError::InvalidArgument { message } => { |
| 533 | assert!(message.contains("required")); |
| 534 | } |
| 535 | other => panic!("Expected InvalidArgument, got: {:?}", other), |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | #[test] |
| 540 | fn test_run_with_invalid_name() { |