summaryrefslogtreecommitdiff
path: root/tests/pkgtoolkit_funcs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkgtoolkit_funcs.rs')
-rw-r--r--tests/pkgtoolkit_funcs.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/pkgtoolkit_funcs.rs b/tests/pkgtoolkit_funcs.rs
index 667592d..3406844 100644
--- a/tests/pkgtoolkit_funcs.rs
+++ b/tests/pkgtoolkit_funcs.rs
@@ -1,4 +1,5 @@
use mesk::pkgtoolkit::pkgtools::{Archs, Package};
+use mesk::cfg::config::Config;
mod shared;
use shared::create_test_config;
@@ -40,7 +41,9 @@ mod package_tests {
Package::extract_archive(archive_path.to_str().unwrap())?;
- let extracted_file_path = temp_dir.path().join("extracted_test_file.txt");
+ let config = Config::parse().unwrap();
+ let extracted_file_path = std::path::Path::new(&config.paths.cache_dir)
+ .join("extracted_test_file.txt");
assert!(extracted_file_path.exists());
let content = fs::read_to_string(extracted_file_path)?;
assert_eq!(content, test_file_content);