feat: more crud for kanban
runner nix smoke / nix label and flake smoke (push) Failing after 2m6s

This commit is contained in:
2026-09-28 00:08:44 +00:00
parent 335a74010d
commit 0cbf267474
10 changed files with 639 additions and 24 deletions
+34
View File
@@ -19,6 +19,19 @@ pub struct Issue {
pub labels: Vec<Label>,
}
#[derive(Debug, Serialize, PartialEq, Eq)]
pub struct CreateIssuePayload {
pub title: String,
pub body: String,
pub projects: Vec<u64>,
}
#[derive(Clone, Debug, Serialize, PartialEq, Eq)]
pub struct EditIssuePayload {
pub title: String,
pub body: String,
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ColumnSpec {
pub id: u64,
@@ -170,4 +183,25 @@ mod tests {
serde_json::json!({"column_id": 9, "sorting": 3})
);
}
#[test]
fn serializes_issue_create_and_edit_payloads() {
let create = CreateIssuePayload {
title: "New issue".to_owned(),
body: "Details".to_owned(),
projects: vec![4],
};
let edit = EditIssuePayload {
title: "Updated".to_owned(),
body: "Changed".to_owned(),
};
assert_eq!(
serde_json::to_value(create).expect("create payload"),
serde_json::json!({"title": "New issue", "body": "Details", "projects": [4]})
);
assert_eq!(
serde_json::to_value(edit).expect("edit payload"),
serde_json::json!({"title": "Updated", "body": "Changed"})
);
}
}