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

Function test_commit_changes_with_changes

src/git.rs:1277–1295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1275
1276 #[tokio::test]
1277 async fn test_commit_changes_with_changes() {
1278 // Create a git repository with uncommitted changes
1279 let test_repo = TestGitRepository::new().unwrap();
1280 test_repo.init_with_commit().unwrap();
1281
1282 // Modify the existing file to create changes
1283 test_repo
1284 .create_file("README.md", "# Test Repository\n\nModified content\n")
1285 .unwrap();
1286
1287 let ctx = AppContext::builder().build();
1288 let manager = RepoManager::new(&ctx);
1289
1290 let result = manager
1291 .commit_changes(test_repo.path(), "Test commit")
1292 .await;
1293
1294 assert!(result.is_ok(), "Error: {result:?}");
1295 }
1296
1297 #[tokio::test]
1298 async fn test_fetch_changes_no_commits() {

Callers

nothing calls this directly

Calls 5

init_with_commitMethod · 0.80
create_fileMethod · 0.80
commit_changesMethod · 0.80
pathMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected