diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-31 16:28:04 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-31 16:38:45 +0100 |
| commit | 436ff29135e3deade80a6e53e53d74dddb613481 (patch) | |
| tree | 53c086492fd710f9f289c756ec511f8b3d3819f3 /tests | |
| parent | 9d4adb9afd591ccef8827902034378acd700c6f8 (diff) | |
fix: mention marker ~> q tag NIP-10 update
required for rust-nostr v0.43 update
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/git_remote_nostr/push.rs | 16 | ||||
| -rw-r--r-- | tests/ngit_send.rs | 3 |
2 files changed, 10 insertions, 9 deletions
diff --git a/tests/git_remote_nostr/push.rs b/tests/git_remote_nostr/push.rs index 5912543..a137da5 100644 --- a/tests/git_remote_nostr/push.rs +++ b/tests/git_remote_nostr/push.rs | |||
| @@ -1070,7 +1070,7 @@ async fn proposal_three_way_merge_commit_pushed_to_main_leads_to_status_event_is | |||
| 1070 | merge_status | 1070 | merge_status |
| 1071 | .tags | 1071 | .tags |
| 1072 | .iter() | 1072 | .iter() |
| 1073 | .find(|t| t.as_slice().len().eq(&4) && t.as_slice()[3].eq("mention")) | 1073 | .find(|t| t.as_slice()[0].eq("q")) |
| 1074 | .unwrap() | 1074 | .unwrap() |
| 1075 | .as_slice()[1], | 1075 | .as_slice()[1], |
| 1076 | "status mentions proposal tip event \r\nmerge status:\r\n{}\r\nproposal tip:\r\n{}", | 1076 | "status mentions proposal tip event \r\nmerge status:\r\n{}\r\nproposal tip:\r\n{}", |
| @@ -1252,9 +1252,10 @@ async fn proposal_fast_forward_merge_commits_pushed_to_main_leads_to_status_even | |||
| 1252 | .collect::<Vec<String>>() | 1252 | .collect::<Vec<String>>() |
| 1253 | { | 1253 | { |
| 1254 | assert!( | 1254 | assert!( |
| 1255 | merge_status.tags.iter().any(|t| t.as_slice().len().eq(&4) | 1255 | merge_status |
| 1256 | && t.as_slice()[1] == patch_id | 1256 | .tags |
| 1257 | && t.as_slice()[3].eq("mention")), | 1257 | .iter() |
| 1258 | .any(|t| t.as_slice()[0].eq("q") && t.as_slice()[1] == patch_id), | ||
| 1258 | "merge status doesnt mention proposal patch {patch_id} \r\nmerge status:\r\n{}", | 1259 | "merge status doesnt mention proposal patch {patch_id} \r\nmerge status:\r\n{}", |
| 1259 | merge_status.as_json(), | 1260 | merge_status.as_json(), |
| 1260 | ); | 1261 | ); |
| @@ -1422,9 +1423,10 @@ async fn proposal_commits_applied_and_pushed_to_main_leads_to_status_event_issue | |||
| 1422 | .collect::<Vec<String>>() | 1423 | .collect::<Vec<String>>() |
| 1423 | { | 1424 | { |
| 1424 | assert!( | 1425 | assert!( |
| 1425 | merge_status.tags.iter().any(|t| t.as_slice().len().eq(&4) | 1426 | merge_status |
| 1426 | && t.as_slice()[1] == patch_id | 1427 | .tags |
| 1427 | && t.as_slice()[3].eq("mention")), | 1428 | .iter() |
| 1429 | .any(|t| t.as_slice()[0].eq("q") && t.as_slice()[1] == patch_id), | ||
| 1428 | "merge status doesnt mention proposal patch {patch_id} \r\nmerge status:\r\n{}", | 1430 | "merge status doesnt mention proposal patch {patch_id} \r\nmerge status:\r\n{}", |
| 1429 | merge_status.as_json(), | 1431 | merge_status.as_json(), |
| 1430 | ); | 1432 | ); |
diff --git a/tests/ngit_send.rs b/tests/ngit_send.rs index 2cd5956..9a46469 100644 --- a/tests/ngit_send.rs +++ b/tests/ngit_send.rs | |||
| @@ -1759,9 +1759,8 @@ mod in_reply_to_mentions_issue { | |||
| 1759 | let cover_letter_event: &nostr::Event = | 1759 | let cover_letter_event: &nostr::Event = |
| 1760 | relay.events.iter().find(|e| is_cover_letter(e)).unwrap(); | 1760 | relay.events.iter().find(|e| is_cover_letter(e)).unwrap(); |
| 1761 | assert!(cover_letter_event.tags.iter().any(|t| { | 1761 | assert!(cover_letter_event.tags.iter().any(|t| { |
| 1762 | t.as_slice()[0].eq("e") | 1762 | t.as_slice()[0].eq("q") |
| 1763 | && t.as_slice()[1].eq(&get_pretend_issue_event().id.to_hex()) | 1763 | && t.as_slice()[1].eq(&get_pretend_issue_event().id.to_hex()) |
| 1764 | && t.as_slice()[3].eq(&"mention") | ||
| 1765 | })); | 1764 | })); |
| 1766 | } | 1765 | } |
| 1767 | Ok(()) | 1766 | Ok(()) |