summaryrefslogtreecommitdiffstats
path: root/src/bug_report.rs
diff options
context:
space:
mode:
authorDavid Knaack <davidkna@users.noreply.github.com>2021-01-19 23:23:27 +0100
committerGitHub <noreply@github.com>2021-01-19 23:23:27 +0100
commitd3002cf96177b4afca5a89a84ab99eb2a2dceec3 (patch)
treeb8f8d48a487fafee97deb76cf1064a358529f29c /src/bug_report.rs
parentcf82762f6ed1fed06825bdd9bdd7be5148ba5a85 (diff)
test: avoid setting $HOME (#2155)
* test: avoid setting $HOME * add comment to get_home * move everything to context.get_home
Diffstat (limited to 'src/bug_report.rs')
-rw-r--r--src/bug_report.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bug_report.rs b/src/bug_report.rs
index 3e3575382..7dc1f9779 100644
--- a/src/bug_report.rs
+++ b/src/bug_report.rs
@@ -254,10 +254,10 @@ mod tests {
#[test]
#[cfg(not(windows))]
fn test_get_config_path() {
- env::set_var("HOME", "/test/home");
-
let config_path = get_config_path("bash");
- assert_eq!("/test/home/.bashrc", config_path.unwrap().to_str().unwrap());
- env::remove_var("HOME");
+ assert_eq!(
+ dirs_next::home_dir().unwrap().join(".bashrc"),
+ config_path.unwrap()
+ );
}
}