()
| 422 | |
| 423 | #[test] |
| 424 | fn test_run_without_name() { |
| 425 | let cmd = Switch::default(); |
| 426 | let result = cmd.run(); |
| 427 | assert!(result.is_err()); |
| 428 | match result.unwrap_err() { |
| 429 | CliError::InvalidArgument { message } => { |
| 430 | assert!(message.contains("required")); |
| 431 | } |
| 432 | other => panic!("Expected InvalidArgument, got: {:?}", other), |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | // ------------------------------------------------------------------------- |
| 437 | // Integration Tests (require temp repository) |