()
| 611 | |
| 612 | #[tokio::test] |
| 613 | async fn test_is_git_repository() { |
| 614 | // Test with a directory that is not a git repository |
| 615 | let non_git_dir = TestGitRepository::new().unwrap(); |
| 616 | let is_repo = is_git_repository(non_git_dir.path()).await.unwrap(); |
| 617 | assert!(!is_repo, "Non-git directory should return false"); |
| 618 | |
| 619 | // Test with a valid git repository |
| 620 | let git_dir = TestGitRepository::new().unwrap(); |
| 621 | git_dir.init().unwrap(); |
| 622 | let is_repo = is_git_repository(git_dir.path()).await.unwrap(); |
| 623 | assert!(is_repo, "Git repository should return true"); |
| 624 | |
| 625 | // Test with a subdirectory inside a git repository |
| 626 | let subdir = git_dir.path().join("subdir"); |
| 627 | std::fs::create_dir(&subdir).unwrap(); |
| 628 | let is_repo = is_git_repository(&subdir).await.unwrap(); |
| 629 | assert!( |
| 630 | is_repo, |
| 631 | "Subdirectory inside git repository should return true" |
| 632 | ); |
| 633 | } |
| 634 | |
| 635 | #[tokio::test] |
| 636 | async fn test_git_operations_with_real_repo() { |
nothing calls this directly
no test coverage detected