MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / test_get_current_commit

Function test_get_current_commit

src/git_operations.rs:695–707  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

693
694 #[tokio::test]
695 async fn test_get_current_commit() {
696 let test_repo = TestGitRepository::new().unwrap();
697 let initial_sha = test_repo.init_with_commit().unwrap();
698 let repo_path = test_repo.path();
699
700 // Get the current commit via the function under test
701 let commit_sha = get_current_commit(repo_path).await.unwrap();
702 assert!(!commit_sha.is_empty());
703 assert_eq!(commit_sha.len(), 40);
704
705 // Verify it matches the SHA from init_with_commit
706 assert_eq!(commit_sha, initial_sha);
707 }
708
709 #[tokio::test]
710 async fn test_create_branch_from_commit() {

Callers

nothing calls this directly

Calls 3

get_current_commitFunction · 0.85
init_with_commitMethod · 0.80
pathMethod · 0.80

Tested by

no test coverage detected