Skip to content

Commit 84025d8

Browse files
committed
test(git): add bombadil clone test
1 parent d91c329 commit 84025d8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/git.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,20 @@ fn git_credentials_callback(
109109

110110
Err(git2::Error::from_str("no credential option available"))
111111
}
112+
113+
#[cfg(test)]
114+
mod test {
115+
use crate::git::clone;
116+
use sealed_test::prelude::*;
117+
use speculoos::prelude::*;
118+
use std::path::PathBuf;
119+
120+
#[sealed_test]
121+
fn should_clone_repository() {
122+
let path = PathBuf::from("colo-rs");
123+
// We are cloning a small repo, unrelated to toml-bombadil on purpose here
124+
let clone_result = clone("https://github.com/oknozor/colo-rs.git", &path.as_path());
125+
assert_that!(clone_result).is_ok();
126+
assert_that!(PathBuf::from("colo-rs")).exists();
127+
}
128+
}

0 commit comments

Comments
 (0)