huskies: merge 864

This commit is contained in:
dave
2026-04-30 22:23:21 +00:00
parent 3911c24c26
commit 61cf7684de
41 changed files with 540 additions and 71 deletions
+25 -2
View File
@@ -325,7 +325,12 @@ mod tests {
("4_merge", "9840_story_merge"),
("5_done", "9850_story_done"),
] {
crate::db::write_item_with_content(id, stage, &format!("---\nname: {id}\n---\n"));
crate::db::write_item_with_content(
id,
stage,
&format!("---\nname: {id}\n---\n"),
crate::db::ItemMeta::from_yaml(&format!("---\nname: {id}\n---\n")),
);
}
let ctx = crate::http::context::AppContext::new_test(root);
@@ -369,6 +374,7 @@ mod tests {
"9860_story_test",
"2_current",
"---\nname: Test Story\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\nname: Test Story\n---\n# Story\n"),
);
let ctx = crate::http::context::AppContext::new_test(root);
@@ -404,6 +410,7 @@ mod tests {
"9861_story_done",
"2_current",
"---\nname: Done Story\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\nname: Done Story\n---\n# Story\n"),
);
let ctx = crate::http::context::AppContext::new_test(root);
@@ -436,6 +443,7 @@ mod tests {
"9862_story_pending",
"2_current",
"---\nname: Pending Story\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\nname: Pending Story\n---\n# Story\n"),
);
let ctx = crate::http::context::AppContext::new_test(root);
@@ -466,11 +474,15 @@ mod tests {
"9863_story_dependent",
"1_backlog",
"---\nname: Dependent Story\ndepends_on: [10, 11]\n---\n",
crate::db::ItemMeta::from_yaml(
"---\nname: Dependent Story\ndepends_on: [10, 11]\n---\n",
),
);
crate::db::write_item_with_content(
"9864_story_independent",
"1_backlog",
"---\nname: Independent Story\n---\n",
crate::db::ItemMeta::from_yaml("---\nname: Independent Story\n---\n"),
);
let tmp = tempfile::tempdir().unwrap();
@@ -499,11 +511,13 @@ mod tests {
"9870_story_view_upcoming",
"1_backlog",
"---\nname: View Upcoming\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\nname: View Upcoming\n---\n# Story\n"),
);
crate::db::write_item_with_content(
"9871_story_worktree",
"1_backlog",
"---\nname: Worktree Orchestration\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\nname: Worktree Orchestration\n---\n# Story\n"),
);
let tmp = tempfile::tempdir().unwrap();
@@ -530,6 +544,7 @@ mod tests {
"9872_story_example",
"1_backlog",
"---\nname: A Story\n---\n",
crate::db::ItemMeta::from_yaml("---\nname: A Story\n---\n"),
);
let tmp = tempfile::tempdir().unwrap();
@@ -545,11 +560,13 @@ mod tests {
"9873_story_todos",
"2_current",
"---\nname: Show TODOs\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\nname: Show TODOs\n---\n# Story\n"),
);
crate::db::write_item_with_content(
"9874_story_front_matter",
"1_backlog",
"---\nname: Enforce Front Matter\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\nname: Enforce Front Matter\n---\n# Story\n"),
);
let tmp = tempfile::tempdir().unwrap();
@@ -569,7 +586,12 @@ mod tests {
#[test]
fn validate_story_dirs_missing_front_matter() {
crate::db::ensure_content_store();
crate::db::write_item_with_content("9875_story_no_fm", "2_current", "# No front matter\n");
crate::db::write_item_with_content(
"9875_story_no_fm",
"2_current",
"# No front matter\n",
crate::db::ItemMeta::from_yaml("# No front matter\n"),
);
let tmp = tempfile::tempdir().unwrap();
let results = validate_story_dirs(tmp.path()).unwrap();
@@ -588,6 +610,7 @@ mod tests {
"9876_story_no_name",
"2_current",
"---\n---\n# Story\n",
crate::db::ItemMeta::from_yaml("---\n---\n# Story\n"),
);
let tmp = tempfile::tempdir().unwrap();