diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2023-11-01 00:00:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2023-11-01 00:00:00 +0000 |
| commit | 6672f54dc166d7447e5c799f1809ecbb3d9ec04c (patch) | |
| tree | 26d56fc39ee10eccb9b9f5f7a91142c65c803f59 /tests/prs_create.rs | |
| parent | 57321aa9136293b24757a6695a5c92087af539ab (diff) | |
feat(prs-create) use r instead of t tag for refs
r tags are indexed by relays in they same way as t tags and are a more
appropriate for referencing commits
Diffstat (limited to 'tests/prs_create.rs')
| -rw-r--r-- | tests/prs_create.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/prs_create.rs b/tests/prs_create.rs index 3b8aa31..72a85c8 100644 --- a/tests/prs_create.rs +++ b/tests/prs_create.rs | |||
| @@ -420,8 +420,8 @@ mod sends_pr_and_2_patches_to_3_relays { | |||
| 420 | .find(|e| e.kind.as_u64().eq(&PR_KIND)) | 420 | .find(|e| e.kind.as_u64().eq(&PR_KIND)) |
| 421 | .unwrap(); | 421 | .unwrap(); |
| 422 | 422 | ||
| 423 | // root commit 't' tag | 423 | // root commit 'r' tag |
| 424 | assert!(pr_event.tags.iter().any(|t| t.as_vec()[0].eq("t") | 424 | assert!(pr_event.tags.iter().any(|t| t.as_vec()[0].eq("r") |
| 425 | && t.as_vec()[1].eq("r-9ee507fc4357d7ee16a5d8901bedcd103f23c17d"))); | 425 | && t.as_vec()[1].eq("r-9ee507fc4357d7ee16a5d8901bedcd103f23c17d"))); |
| 426 | } | 426 | } |
| 427 | Ok(()) | 427 | Ok(()) |
| @@ -444,12 +444,12 @@ mod sends_pr_and_2_patches_to_3_relays { | |||
| 444 | static COMMIT_ID: &str = "fe973a840fba2a8ab37dd505c154854a69a6505c"; | 444 | static COMMIT_ID: &str = "fe973a840fba2a8ab37dd505c154854a69a6505c"; |
| 445 | let most_recent_patch = patch_events[0]; | 445 | let most_recent_patch = patch_events[0]; |
| 446 | 446 | ||
| 447 | // commit 't' and 'commit' tag | 447 | // commit 'r' and 'commit' tag |
| 448 | assert!( | 448 | assert!( |
| 449 | most_recent_patch | 449 | most_recent_patch |
| 450 | .tags | 450 | .tags |
| 451 | .iter() | 451 | .iter() |
| 452 | .any(|t| t.as_vec()[0].eq("t") && t.as_vec()[1].eq(COMMIT_ID)) | 452 | .any(|t| t.as_vec()[0].eq("r") && t.as_vec()[1].eq(COMMIT_ID)) |
| 453 | ); | 453 | ); |
| 454 | assert!( | 454 | assert!( |
| 455 | most_recent_patch | 455 | most_recent_patch |
| @@ -464,14 +464,14 @@ mod sends_pr_and_2_patches_to_3_relays { | |||
| 464 | most_recent_patch | 464 | most_recent_patch |
| 465 | .tags | 465 | .tags |
| 466 | .iter() | 466 | .iter() |
| 467 | .any(|t| t.as_vec()[0].eq("t") && t.as_vec()[1].eq(COMMIT_PARENT_ID)) | 467 | .any(|t| t.as_vec()[0].eq("r") && t.as_vec()[1].eq(COMMIT_PARENT_ID)) |
| 468 | ); | 468 | ); |
| 469 | assert!(most_recent_patch.tags.iter().any( | 469 | assert!(most_recent_patch.tags.iter().any( |
| 470 | |t| t.as_vec()[0].eq("parent-commit") && t.as_vec()[1].eq(COMMIT_PARENT_ID) | 470 | |t| t.as_vec()[0].eq("parent-commit") && t.as_vec()[1].eq(COMMIT_PARENT_ID) |
| 471 | )); | 471 | )); |
| 472 | 472 | ||
| 473 | // root commit 't' tag | 473 | // root commit 't' tag |
| 474 | assert!(most_recent_patch.tags.iter().any(|t| t.as_vec()[0].eq("t") | 474 | assert!(most_recent_patch.tags.iter().any(|t| t.as_vec()[0].eq("r") |
| 475 | && t.as_vec()[1].eq("r-9ee507fc4357d7ee16a5d8901bedcd103f23c17d"))); | 475 | && t.as_vec()[1].eq("r-9ee507fc4357d7ee16a5d8901bedcd103f23c17d"))); |
| 476 | } | 476 | } |
| 477 | Ok(()) | 477 | Ok(()) |