| 1376 | |
| 1377 | #[test] |
| 1378 | fn test_repository_status_has_conflicts() { |
| 1379 | let mut status = RepositoryStatus::new("dev".to_string(), None); |
| 1380 | |
| 1381 | assert!(!status.has_conflicts()); |
| 1382 | |
| 1383 | status.add_entry(FileStatusEntry::new( |
| 1384 | PathBuf::from("clean.txt"), |
| 1385 | FileStatus::Clean, |
| 1386 | )); |
| 1387 | assert!(!status.has_conflicts()); |
| 1388 | |
| 1389 | status.add_entry(FileStatusEntry::new( |
| 1390 | PathBuf::from("conflict.txt"), |
| 1391 | FileStatus::Conflicted, |
| 1392 | )); |
| 1393 | assert!(status.has_conflicts()); |
| 1394 | } |
| 1395 | |
| 1396 | #[test] |
| 1397 | fn test_repository_status_has_untracked() { |