()
| 374 | |
| 375 | #[test] |
| 376 | fn test_branch_operations() -> Result<()> { |
| 377 | let repo = TestGitRepository::new()?; |
| 378 | repo.init_with_commit()?; |
| 379 | |
| 380 | let initial_branch = repo.current_branch()?; |
| 381 | assert!(initial_branch == "main" || initial_branch == "master"); |
| 382 | |
| 383 | repo.checkout_new_branch("feature")?; |
| 384 | assert_eq!(repo.current_branch()?, "feature"); |
| 385 | |
| 386 | repo.checkout_branch(&initial_branch)?; |
| 387 | assert_eq!(repo.current_branch()?, initial_branch); |
| 388 | |
| 389 | Ok(()) |
| 390 | } |
| 391 | |
| 392 | #[test] |
| 393 | fn test_setup_with_uncommitted_changes() -> Result<()> { |
nothing calls this directly
no test coverage detected