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

Source from the content-addressed store, hash-verified

645
646 #[test]
647 fn test_run_with_invalid_name() {
648 let cmd = New::with_name("invalid/name");
649 let result = cmd.run();
650 // Should fail with InvalidArgument before even trying to open repo
651 assert!(result.is_err());
652 match result.unwrap_err() {
653 CliError::InvalidArgument { message } => {
654 assert!(message.contains("'/'"));
655 }
656 CliError::RepositoryNotFound { .. } => {
657 // Also acceptable - validation passed but no repo
658 }
659 other => panic!(
660 "Expected InvalidArgument or RepositoryNotFound, got: {:?}",
661 other
662 ),
663 }
664 }
665
666 // -------------------------------------------------------------------------
667 // Integration Tests (require temp repository)

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected