test dir cleanup: rename test/0001/dd79c8cfb8beeacd0460429944b4ecbe comment
Renaming everything also means they have new creation-times, since we're now git logging a different file/dir.
This commit is contained in:
parent
05c7c6f441
commit
598f4e5df8
4 changed files with 18 additions and 8 deletions
|
|
@ -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-24T10:08:38-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);
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,16 @@ mod tests {
|
||||||
let comment_uuid = String::from("9055dac36045fe36545bed7ae7b49347");
|
let comment_uuid = String::from("9055dac36045fe36545bed7ae7b49347");
|
||||||
comment_dir.push("comments");
|
comment_dir.push("comments");
|
||||||
comment_dir.push(&comment_uuid);
|
comment_dir.push(&comment_uuid);
|
||||||
let expected_comments = Vec::<crate::comment::Comment>::new();
|
let mut expected_comments = Vec::<crate::comment::Comment>::new();
|
||||||
|
expected_comments.push(
|
||||||
|
crate::comment::Comment {
|
||||||
|
uuid: comment_uuid,
|
||||||
|
author: String::from("Sebastian Kuzminsky <seb@highlab.com>"),
|
||||||
|
creation_time: chrono::DateTime::parse_from_rfc3339("2025-07-24T10:08:38-06:00").unwrap().with_timezone(&chrono::Local),
|
||||||
|
description: String::from("This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe\n\nIt has multiple lines\n"),
|
||||||
|
dir: std::path::PathBuf::from(comment_dir),
|
||||||
|
}
|
||||||
|
);
|
||||||
expected.add_issue(
|
expected.add_issue(
|
||||||
crate::issue::Issue {
|
crate::issue::Issue {
|
||||||
id: uuid,
|
id: uuid,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe
|
||||||
|
|
||||||
|
It has multiple lines
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
This is a comment on issue dd79c8cfb8beeacd0460429944b4ecbe95a31561
|
|
||||||
|
|
||||||
It has multiple lines
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue