()
| 554 | |
| 555 | #[test] |
| 556 | fn test_run_without_name() { |
| 557 | let cmd = New::default(); |
| 558 | let result = cmd.run(); |
| 559 | assert!(result.is_err()); |
| 560 | match result.unwrap_err() { |
| 561 | CliError::InvalidArgument { message } => { |
| 562 | assert!(message.contains("required")); |
| 563 | } |
| 564 | other => panic!("Expected InvalidArgument, got: {:?}", other), |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | #[test] |
| 569 | fn test_run_with_invalid_name() { |