From 46d8618e749362ae251838c36e6df87304febcdf Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sun, 20 Jul 2025 17:14:37 -0500 Subject: [PATCH] Fix config unit tests: project path is set! The project path value gets set as a side-effect of loading the named configuration table. Which... actually means this information isn't important. I know it going in, and I know it coming out. I think the real fix is to delete the field. --- src/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 1afdf26..a7b81c9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -285,7 +285,7 @@ mod tests { .map(PathBuf::from); let load_result = get_config("/no/such/project", search_paths)?; let expected = PartialConfig { - project_path: None, + project_path: Some(String::from("/no/such/project")), owner: None, repo: None, gitea_url: Some(String::from("http://localhost:3000")), @@ -304,6 +304,7 @@ mod tests { .map(PathBuf::from); let load_result = get_config("/some/other/path", search_paths)?; let expected = PartialConfig { + project_path: Some(String::from("/some/other/path")), gitea_url: Some(String::from("fake-url")), ..PartialConfig::default() };