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:565–582  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected