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

20 lines
593 B
Rust

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);
}
}