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

Function test_add_run_outside_repository

atomic-cli/src/commands/add.rs:769–780  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

767 #[test]
768 #[serial]
769 fn test_add_run_outside_repository() {
770 let _guard = DirGuard::new();
771
772 let temp_dir = tempfile::tempdir().unwrap();
773 std::env::set_current_dir(&temp_dir).unwrap();
774
775 let add = Add::new().with_files(vec!["file.txt"]);
776 let result = add.run();
777
778 // Should fail because we're not in a repository
779 assert!(result.is_err());
780 }
781
782 #[test]
783 #[serial]

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
with_filesMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected