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

Function test_repository_status_get

atomic-repository/src/status.rs:1015–1029  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1013
1014 #[test]
1015 fn test_repository_status_get() {
1016 let mut status = RepositoryStatus::new("dev".to_string(), None);
1017
1018 status.add_entry(FileStatusEntry::new(
1019 PathBuf::from("src/main.rs"),
1020 FileStatus::Modified,
1021 ));
1022
1023 let entry = status.get(Path::new("src/main.rs"));
1024 assert!(entry.is_some());
1025 assert_eq!(entry.unwrap().status(), FileStatus::Modified);
1026
1027 let missing = status.get(Path::new("nonexistent.rs"));
1028 assert!(missing.is_none());
1029 }
1030
1031 #[test]
1032 fn test_repository_status_filters() {

Callers

nothing calls this directly

Calls 2

add_entryMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected