mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-22 03:05:32 +02:00
fix: complete web UI smoke path
This commit is contained in:
parent
47e6f0e53f
commit
7a3d23624a
2 changed files with 14 additions and 0 deletions
|
|
@ -270,6 +270,9 @@ fn determine_source(path: &str) -> Source {
|
|||
return Source::Snapchat;
|
||||
}
|
||||
}
|
||||
if Path::new(path).exists() {
|
||||
return Source::Local;
|
||||
}
|
||||
Source::Other
|
||||
}
|
||||
|
||||
|
|
@ -1196,6 +1199,16 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_existing_local_path_source() {
|
||||
let path = env::current_dir().unwrap().join("Cargo.toml");
|
||||
assert_eq!(
|
||||
determine_source(path.to_str().unwrap()),
|
||||
Source::Local,
|
||||
"existing filesystem paths should be archived as local files"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_initialize_store_directories() {
|
||||
let store_path = env::temp_dir().join(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue