update all tests for renamed issue & comment ids

Renaming everything also means they have new creation-times, since we're
now git logging a different file/dir.
This commit is contained in:
Sebastian Kuzminsky 2025-07-23 15:31:52 -06:00
parent 64b64efddc
commit 3b64acbf3f
4 changed files with 33 additions and 32 deletions

View file

@ -212,16 +212,17 @@ mod tests {
#[test] #[test]
fn read_comment_0() { fn read_comment_0() {
let comment_dir = let comment_dir = std::path::Path::new(
std::path::Path::new("test/0001/dd79c8cfb8beeacd0460429944b4ecbe95a31561/comments/9055dac36045fe36545bed7ae7b49347"); "test/0001/dd79c8cfb8beeacd0460429944b4ecbe/comments/9055dac36045fe36545bed7ae7b49347",
);
let comment = Comment::new_from_dir(comment_dir).unwrap(); let comment = Comment::new_from_dir(comment_dir).unwrap();
let expected = Comment { let expected = Comment {
uuid: String::from("9055dac36045fe36545bed7ae7b49347"), uuid: String::from("9055dac36045fe36545bed7ae7b49347"),
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-07T15:26:26-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
description: String::from("This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe95a31561\n\nIt has multiple lines\n"), description: String::from("This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe\n\nIt has multiple lines\n"),
dir: std::path::PathBuf::from(comment_dir), dir: std::path::PathBuf::from(comment_dir),
}; };
assert_eq!(comment, expected); assert_eq!(comment, expected);

View file

@ -553,12 +553,12 @@ mod tests {
#[test] #[test]
fn read_issue_0() { fn read_issue_0() {
let issue_dir = std::path::Path::new("test/0000/3943fc5c173fdf41c0a22251593cd476d96e6c9f/"); let issue_dir = std::path::Path::new("test/0000/3943fc5c173fdf41c0a22251593cd476/");
let issue = Issue::new_from_dir(issue_dir).unwrap(); let issue = Issue::new_from_dir(issue_dir).unwrap();
let expected = Issue { let expected = Issue {
id: String::from("3943fc5c173fdf41c0a22251593cd476d96e6c9f"), id: String::from("3943fc5c173fdf41c0a22251593cd476"),
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-03T12:14:26-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,
@ -581,12 +581,12 @@ mod tests {
#[test] #[test]
fn read_issue_1() { fn read_issue_1() {
let issue_dir = std::path::Path::new("test/0000/7792b063eef6d33e7da5dc1856750c149ba678c6/"); let issue_dir = std::path::Path::new("test/0000/7792b063eef6d33e7da5dc1856750c14/");
let issue = Issue::new_from_dir(issue_dir).unwrap(); let issue = Issue::new_from_dir(issue_dir).unwrap();
let expected = Issue { let expected = Issue {
id: String::from("7792b063eef6d33e7da5dc1856750c149ba678c6"), id: String::from("7792b063eef6d33e7da5dc1856750c14"),
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-03T12:14:26-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,

View file

@ -96,13 +96,13 @@ mod tests {
let mut expected = Issues::new(); let mut expected = Issues::new();
let uuid = String::from("7792b063eef6d33e7da5dc1856750c149ba678c6"); let uuid = String::from("7792b063eef6d33e7da5dc1856750c14");
let mut dir = std::path::PathBuf::from(issues_dir); let mut dir = std::path::PathBuf::from(issues_dir);
dir.push(&uuid); dir.push(&uuid);
expected.add_issue(crate::issue::Issue { expected.add_issue(crate::issue::Issue {
id: uuid, id: uuid,
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-03T12:14:26-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,
@ -115,14 +115,14 @@ mod tests {
dir, dir,
}); });
let uuid = String::from("3943fc5c173fdf41c0a22251593cd476d96e6c9f"); let uuid = String::from("3943fc5c173fdf41c0a22251593cd476");
let mut dir = std::path::PathBuf::from(issues_dir); let mut dir = std::path::PathBuf::from(issues_dir);
dir.push(&uuid); dir.push(&uuid);
expected.add_issue( expected.add_issue(
crate::issue::Issue { crate::issue::Issue {
id: uuid, id: uuid,
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-03T12:14:26-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,
@ -149,13 +149,13 @@ mod tests {
let mut expected = Issues::new(); let mut expected = Issues::new();
let uuid = String::from("3fa5bfd93317ad25772680071d5ac3259cd2384f"); let uuid = String::from("3fa5bfd93317ad25772680071d5ac325");
let mut dir = std::path::PathBuf::from(issues_dir); let mut dir = std::path::PathBuf::from(issues_dir);
dir.push(&uuid); dir.push(&uuid);
expected.add_issue(crate::issue::Issue { expected.add_issue(crate::issue::Issue {
id: uuid, id: uuid,
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-03T11:59:44-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: Some( done_time: Some(
@ -172,7 +172,7 @@ mod tests {
dir, dir,
}); });
let uuid = String::from("dd79c8cfb8beeacd0460429944b4ecbe95a31561"); let uuid = String::from("dd79c8cfb8beeacd0460429944b4ecbe");
let mut dir = std::path::PathBuf::from(issues_dir); let mut dir = std::path::PathBuf::from(issues_dir);
dir.push(&uuid); dir.push(&uuid);
let mut comment_dir = dir.clone(); let mut comment_dir = dir.clone();
@ -184,8 +184,8 @@ mod tests {
crate::comment::Comment { crate::comment::Comment {
uuid: comment_uuid, uuid: comment_uuid,
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-07T15:26:26-06:00").unwrap().with_timezone(&chrono::Local), creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00").unwrap().with_timezone(&chrono::Local),
description: String::from("This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe95a31561\n\nIt has multiple lines\n"), description: String::from("This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe\n\nIt has multiple lines\n"),
dir: std::path::PathBuf::from(comment_dir), dir: std::path::PathBuf::from(comment_dir),
} }
); );
@ -193,7 +193,7 @@ mod tests {
crate::issue::Issue { crate::issue::Issue {
id: uuid, id: uuid,
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-03T11:59:44-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,
@ -216,13 +216,13 @@ mod tests {
let mut expected = Issues::new(); let mut expected = Issues::new();
let uuid = String::from("3fa5bfd93317ad25772680071d5ac3259cd2384f"); let uuid = String::from("3fa5bfd93317ad25772680071d5ac325");
let mut dir = std::path::PathBuf::from(issues_dir); let mut dir = std::path::PathBuf::from(issues_dir);
dir.push(&uuid); dir.push(&uuid);
expected.add_issue(crate::issue::Issue { expected.add_issue(crate::issue::Issue {
id: uuid, id: uuid,
author: String::from("sigil-03 <sigil@glyphs.tech>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-05T13:55:49-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,
@ -235,14 +235,14 @@ mod tests {
dir, dir,
}); });
let uuid = String::from("dd79c8cfb8beeacd0460429944b4ecbe95a31561"); let uuid = String::from("dd79c8cfb8beeacd0460429944b4ecbe");
let mut dir = std::path::PathBuf::from(issues_dir); let mut dir = std::path::PathBuf::from(issues_dir);
dir.push(&uuid); dir.push(&uuid);
expected.add_issue( expected.add_issue(
crate::issue::Issue { crate::issue::Issue {
id: uuid, id: uuid,
author: String::from("sigil-03 <sigil@glyphs.tech>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-05T13:55:49-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,
@ -256,22 +256,22 @@ mod tests {
}, },
); );
let uuid = String::from("a85f81fc5f14cb5d4851dd445dc9744c7f16ccc7"); let uuid = String::from("a85f81fc5f14cb5d4851dd445dc9744c");
let mut dir = std::path::PathBuf::from(issues_dir); let mut dir = std::path::PathBuf::from(issues_dir);
dir.push(&uuid); dir.push(&uuid);
expected.add_issue( expected.add_issue(
crate::issue::Issue { crate::issue::Issue {
id: uuid, id: uuid,
author: String::from("sigil-03 <sigil@glyphs.tech>"), author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-05T13:55:49-06:00") creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-23T15:06:31-06:00")
.unwrap() .unwrap()
.with_timezone(&chrono::Local), .with_timezone(&chrono::Local),
done_time: None, done_time: None,
tags: Vec::<String>::new(), tags: Vec::<String>::new(),
state: crate::issue::State::WontDo, state: crate::issue::State::WontDo,
dependencies: Some(vec![ dependencies: Some(vec![
crate::issue::IssueHandle::from("3fa5bfd93317ad25772680071d5ac3259cd2384f"), crate::issue::IssueHandle::from("3fa5bfd93317ad25772680071d5ac325"),
crate::issue::IssueHandle::from("dd79c8cfb8beeacd0460429944b4ecbe95a31561"), crate::issue::IssueHandle::from("dd79c8cfb8beeacd0460429944b4ecbe"),
]), ]),
assignee: None, assignee: None,
description: String::from("issue with dependencies\n\na test has begun\nfor dependencies we seek\nintertwining life"), description: String::from("issue with dependencies\n\na test has begun\nfor dependencies we seek\nintertwining life"),

View file

@ -1,3 +1,3 @@
This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe95a31561 This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe
It has multiple lines It has multiple lines