diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2021-01-19 23:23:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-19 23:23:27 +0100 |
commit | d3002cf96177b4afca5a89a84ab99eb2a2dceec3 (patch) | |
tree | b8f8d48a487fafee97deb76cf1064a358529f29c /src/bug_report.rs | |
parent | cf82762f6ed1fed06825bdd9bdd7be5148ba5a85 (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.rs | 8 |
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() + ); } } |