diff options
author | Sascha Grunert <Sascha.Grunert@rohde-schwarz.com> | 2016-09-14 10:11:43 +0200 |
---|---|---|
committer | Sascha Grunert <Sascha.Grunert@rohde-schwarz.com> | 2016-09-14 10:11:43 +0200 |
commit | 2e802ba9c99a6b05b03173fb435a3e486c9f7731 (patch) | |
tree | f0664bc8da5eaabb1766f954673f416956414d10 | |
parent | 46a73f3bb9d93f492f18527595c0841f0482885e (diff) |
Added more unit tests for preparation and hook installation
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -661,7 +661,7 @@ mod tests { #[test] fn prepare_message_success_3() { let journal = GitJournal::new(".").unwrap(); - assert!(journal.prepare("./tests/commit_messages/success_2").is_ok()); + assert!(journal.prepare("./tests/commit_messages/failure_2").is_ok()); } #[test] @@ -669,4 +669,12 @@ mod tests { let journal = GitJournal::new(".").unwrap(); assert!(journal.prepare("TEST").is_err()); } + + #[test] + fn install_git_hook() { + let journal = GitJournal::new(".").unwrap(); + assert!(journal.install_git_hook("test", "echo 1\n").is_ok()); + assert!(journal.install_git_hook("test", "echo 1\n").is_ok()); + assert!(journal.install_git_hook("test", "echo 2\n").is_ok()); + } } |