Cleanup
This commit is contained in:
parent
ce5fc51637
commit
98a6f094be
1 changed files with 6 additions and 9 deletions
|
@ -62,15 +62,12 @@ fn forbid_backup_of_paths_within_repository() -> Result<(), BakareError> {
|
|||
let repository_path = &tempdir()?.into_path();
|
||||
Repository::init(repository_path)?;
|
||||
let mut repository = Repository::open(repository_path)?;
|
||||
if let Err(e) = backup::Engine::new(repository_path, &mut repository) {
|
||||
let correct_error = match e {
|
||||
let error = backup::Engine::new(repository_path, &mut repository).err().unwrap();
|
||||
let correct_error = match error {
|
||||
BakareError::SourceSameAsRepository => true,
|
||||
_ => false,
|
||||
};
|
||||
assert!(correct_error);
|
||||
} else {
|
||||
panic!("Expected error");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue