fix: render per-comment file line instead of thread-level location
This commit is contained in:
@@ -50,12 +50,16 @@ fn render_markdown_includes_expected_sections_and_preserves_comment_markdown() {
|
||||
id: 11,
|
||||
user: "bob".into(),
|
||||
created_at: "2026-04-08T11:01:00Z".into(),
|
||||
path: Some("src/main.rs".into()),
|
||||
line: Some(9),
|
||||
body: "```rs\nlet x = 1;\n```".into(),
|
||||
},
|
||||
replies: vec![CommentItem {
|
||||
id: 12,
|
||||
user: "alice".into(),
|
||||
created_at: "2026-04-08T11:02:00Z".into(),
|
||||
path: Some("src/main.rs".into()),
|
||||
line: Some(12),
|
||||
body: "looks good".into(),
|
||||
}],
|
||||
}],
|
||||
@@ -69,7 +73,9 @@ fn render_markdown_includes_expected_sections_and_preserves_comment_markdown() {
|
||||
assert!(md.contains("## Diff Stat"));
|
||||
assert!(md.contains("## Review 1 (COMMENT)"));
|
||||
assert!(md.contains("### Comment 7.1"));
|
||||
assert!(md.contains("src/main.rs:9"));
|
||||
assert!(md.contains("### Reply 7.1.1"));
|
||||
assert!(md.contains("src/main.rs:12"));
|
||||
assert!(md.contains("````md"));
|
||||
assert!(md.contains("```rs\nlet x = 1;\n```"));
|
||||
assert!(md.contains("looks good"));
|
||||
@@ -107,6 +113,8 @@ fn render_markdown_uses_minimal_fence_for_plain_text() {
|
||||
id: 1,
|
||||
user: "bob".into(),
|
||||
created_at: "2026-04-08T11:00:00Z".into(),
|
||||
path: None,
|
||||
line: None,
|
||||
body: body.into(),
|
||||
},
|
||||
replies: vec![],
|
||||
|
||||
Reference in New Issue
Block a user