Skip to content

Commit

Permalink
split tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed May 30, 2024
1 parent 3d7bbbe commit 11753b7
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tests/test_git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,32 @@ mod git
assert!(!repo.as_ref().unwrap().is_empty().unwrap());
assert!(Path::exists(Path::new(path)));

if Path::exists(Path::new(path))
{
let _ = remove_dir_all(Path::new(path));
}
}

#[test]
pub fn test_clean_and_clone()
{
let config = GitConfig
{
remote: "https://github.com/JerboaBurrow/Busser".into(),
branch: "main".into(),
checkout_schedule: None,
auth: None,
};

let path = "tests/test_clean_and_clone";
let repo = from_clone(path.into(), &config);

assert!(repo.is_ok());
assert!(!repo.as_ref().unwrap().is_empty().unwrap());
assert!(Path::exists(Path::new(path)));

let repo = clean_and_clone(path.into(), config);

println!("{:?}",repo.as_ref().err());
assert!(repo.is_ok());
assert!(!repo.as_ref().unwrap().is_empty().unwrap());
assert!(Path::exists(Path::new(path)));
Expand Down

0 comments on commit 11753b7

Please sign in to comment.