(view_id: u64)
| 426 | use super::*; |
| 427 | |
| 428 | fn sample(view_id: u64) -> RefMapping { |
| 429 | RefMapping { |
| 430 | version: REF_MAPPING_VERSION, |
| 431 | view_id, |
| 432 | view_name: "main".to_string(), |
| 433 | scope: 1, |
| 434 | local_ref: Some("refs/heads/main".to_string()), |
| 435 | remote: Some(("origin".to_string(), "refs/heads/main".to_string())), |
| 436 | last_observed_local: Some("0123456789abcdef0123456789abcdef01234567".to_string()), |
| 437 | last_observed_remote: None, |
| 438 | last_exported: Some("89abcdef0123456789abcdef0123456789abcdef".to_string()), |
| 439 | last_exported_state: Some( |
| 440 | "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB".to_string(), |
| 441 | ), |
| 442 | last_observed_atomic: Some( |
| 443 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".to_string(), |
| 444 | ), |
| 445 | status: RefSyncStatus::Synchronized, |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | #[test] |
| 450 | fn ref_mapping_roundtrips_all_fields() { |
no outgoing calls