Start a test for remote git data updating

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Julia 2022-09-30 15:50:55 -04:00
parent 6540936970
commit ce7f6dd082
10 changed files with 272 additions and 57 deletions

View file

@ -3288,15 +3288,15 @@ mod tests {
#[test]
fn test_changed_repos() {
let prev_repos: Vec<Box<dyn GitRepository>> = vec![
FakeGitRepository::open(Path::new("/.git"), 0),
FakeGitRepository::open(Path::new("/a/.git"), 0),
FakeGitRepository::open(Path::new("/a/b/.git"), 0),
FakeGitRepository::open(Path::new("/.git"), 0, Default::default()),
FakeGitRepository::open(Path::new("/a/.git"), 0, Default::default()),
FakeGitRepository::open(Path::new("/a/b/.git"), 0, Default::default()),
];
let new_repos: Vec<Box<dyn GitRepository>> = vec![
FakeGitRepository::open(Path::new("/a/.git"), 1),
FakeGitRepository::open(Path::new("/a/b/.git"), 0),
FakeGitRepository::open(Path::new("/a/c/.git"), 0),
FakeGitRepository::open(Path::new("/a/.git"), 1, Default::default()),
FakeGitRepository::open(Path::new("/a/b/.git"), 0, Default::default()),
FakeGitRepository::open(Path::new("/a/c/.git"), 0, Default::default()),
];
let res = LocalWorktree::changed_repos(&prev_repos, &new_repos);