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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected