()
| 242 | |
| 243 | #[test] |
| 244 | fn test_run_without_name() { |
| 245 | let cmd = Switch::default(); |
| 246 | let result = cmd.run(); |
| 247 | assert!(result.is_err()); |
| 248 | match result.unwrap_err() { |
| 249 | CliError::InvalidArgument { message } => { |
| 250 | assert!(message.contains("required")); |
| 251 | } |
| 252 | other => panic!("Expected InvalidArgument, got: {:?}", other), |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | // ------------------------------------------------------------------------- |
| 257 | // Integration Tests (require temp repository) |