story-kit: merge 224_story_expand_work_item_to_full_screen_detail_view

This commit is contained in:
Dave
2026-02-27 11:21:35 +00:00
parent 3912f8ecc8
commit 101bfd78fe
6 changed files with 449 additions and 10 deletions

View File

@@ -79,6 +79,10 @@ pub fn bad_request(message: String) -> poem::Error {
poem::Error::from_string(message, StatusCode::BAD_REQUEST)
}
pub fn not_found(message: String) -> poem::Error {
poem::Error::from_string(message, StatusCode::NOT_FOUND)
}
#[cfg(test)]
mod tests {
use super::*;
@@ -102,5 +106,8 @@ mod tests {
assert_eq!(PermissionDecision::AlwaysAllow, PermissionDecision::AlwaysAllow);
assert_ne!(PermissionDecision::Deny, PermissionDecision::Approve);
assert_ne!(PermissionDecision::Approve, PermissionDecision::AlwaysAllow);
fn not_found_returns_404_status() {
let err = not_found("item not found".to_string());
assert_eq!(err.status(), StatusCode::NOT_FOUND);
}
}