Migrate #4

Merged
phoenix merged 26 commits from migrate into v0.1.x 2026-06-06 17:47:45 -04:00
Showing only changes of commit ba3cf2e01f - Show all commits
+23
View File
@@ -74,3 +74,26 @@ pub fn parse_message(filepath: &str) -> Result<Message, std::io::Error> {
} }
} }
} }
#[cfg(test)]
mod tests {
#[test]
fn test_parse_message() {
let message_path = String::from("tests/message-0.json");
match super::parse_message(&message_path) {
Ok(message) => {
assert_eq!(false, message.content.is_empty(), "Content is empty");
}
Err(err) => {
assert!(false, "Error: {err:?}");
}
};
}
#[test]
fn test_parse_numbers() {
let numbers_path = String::from("tests/numbers-0.json");
let contacts = super::parse_numbers(&numbers_path);
assert_eq!(false, contacts.is_empty(), "Should not be empty");
}
}