feat: add tests for git setup
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
21
crates/cuddle-please/tests/vcs.rs
Normal file
21
crates/cuddle-please/tests/vcs.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
pub mod common;
|
||||
|
||||
use cuddle_please::git_client::VcsClient;
|
||||
use tracing_test::traced_test;
|
||||
|
||||
use crate::common::get_test_data_path;
|
||||
|
||||
#[test]
|
||||
#[traced_test]
|
||||
fn test_vcs_get_noop() {
|
||||
let noop = VcsClient::new_noop();
|
||||
assert!(matches!(noop, VcsClient::Noop {}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[traced_test]
|
||||
fn test_vcs_get_git_found() {
|
||||
let testdata = get_test_data_path("git-found");
|
||||
let git = VcsClient::new_git(&testdata).unwrap();
|
||||
assert_eq!(git, VcsClient::Git { source: testdata })
|
||||
}
|
Reference in New Issue
Block a user