()
| 632 | |
| 633 | #[test] |
| 634 | fn test_run_without_name() { |
| 635 | let cmd = New::default(); |
| 636 | let result = cmd.run(); |
| 637 | assert!(result.is_err()); |
| 638 | match result.unwrap_err() { |
| 639 | CliError::InvalidArgument { message } => { |
| 640 | assert!(message.contains("required")); |
| 641 | } |
| 642 | other => panic!("Expected InvalidArgument, got: {:?}", other), |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | #[test] |
| 647 | fn test_run_with_invalid_name() { |