MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_run_with_invalid_name

Function test_run_with_invalid_name

atomic-cli/src/commands/view/new.rs:572–589  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570
571 #[test]
572 fn test_run_with_invalid_name() {
573 let cmd = New::with_name("invalid/name");
574 let result = cmd.run();
575 // Should fail with InvalidArgument before even trying to open repo
576 assert!(result.is_err());
577 match result.unwrap_err() {
578 CliError::InvalidArgument { message } => {
579 assert!(message.contains("'/'"));
580 }
581 CliError::RepositoryNotFound { .. } => {
582 // Also acceptable - validation passed but no repo
583 }
584 other => panic!(
585 "Expected InvalidArgument or RepositoryNotFound, got: {:?}",
586 other
587 ),
588 }
589 }
590
591 // -------------------------------------------------------------------------
592 // Integration Tests (require temp repository)

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected