huskies: merge 961
This commit is contained in:
@@ -6,7 +6,7 @@ use std::path::Path;
|
||||
///
|
||||
/// Returns the story content or an error if not found.
|
||||
pub(crate) fn read_story_content(_project_root: &Path, story_id: &str) -> Result<String, String> {
|
||||
crate::db::read_content(story_id)
|
||||
crate::db::read_content(crate::db::ContentKey::Story(story_id))
|
||||
.ok_or_else(|| format!("Story '{story_id}' not found in any pipeline stage."))
|
||||
}
|
||||
|
||||
@@ -341,7 +341,10 @@ mod tests {
|
||||
fn read_story_content_from_content_store() {
|
||||
crate::db::ensure_content_store();
|
||||
let content = "---\nname: Test\n---\n# Story\n";
|
||||
crate::db::write_content("9878_story_read_test", content);
|
||||
crate::db::write_content(
|
||||
crate::db::ContentKey::Story("9878_story_read_test"),
|
||||
content,
|
||||
);
|
||||
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
let result = read_story_content(tmp.path(), "9878_story_read_test").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user