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

Source from the content-addressed store, hash-verified

915 #[test]
916 #[file_serial]
917 fn test_add_run_outside_repository() {
918 let _guard = DirGuard::new();
919
920 let temp_dir = tempfile::tempdir().unwrap();
921 std::env::set_current_dir(&temp_dir).unwrap();
922
923 let add = Add::new().with_files(vec!["file.txt"]);
924 let result = add.run();
925
926 // Should fail because we're not in a repository
927 assert!(result.is_err());
928 }
929
930 #[test]
931 #[file_serial]

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
with_filesMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected