git-next/crates/git/src/tests.rs

21 lines
593 B
Rust
Raw Normal View History

2024-05-17 20:30:28 +01:00
mod commit {
use crate::{commit, Commit};
#[test]
fn should_return_sha() {
let sha = commit::Sha::new("sha".to_string());
let message = commit::Message::new("message".to_string());
let commit = Commit::new(sha.clone(), message);
assert_eq!(commit.sha(), &sha);
}
#[test]
fn should_return_message() {
let sha = commit::Sha::new("sha".to_string());
let message = commit::Message::new("message".to_string());
let commit = Commit::new(sha, message.clone());
assert_eq!(commit.message(), &message);
}
}