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.
This commit is contained in:
2025-07-20 17:14:37 -05:00
parent 73363718c3
commit 46d8618e74

View File

@@ -285,7 +285,7 @@ mod tests {
.map(PathBuf::from); .map(PathBuf::from);
let load_result = get_config("/no/such/project", search_paths)?; let load_result = get_config("/no/such/project", search_paths)?;
let expected = PartialConfig { let expected = PartialConfig {
project_path: None, project_path: Some(String::from("/no/such/project")),
owner: None, owner: None,
repo: None, repo: None,
gitea_url: Some(String::from("http://localhost:3000")), gitea_url: Some(String::from("http://localhost:3000")),
@@ -304,6 +304,7 @@ mod tests {
.map(PathBuf::from); .map(PathBuf::from);
let load_result = get_config("/some/other/path", search_paths)?; let load_result = get_config("/some/other/path", search_paths)?;
let expected = PartialConfig { let expected = PartialConfig {
project_path: Some(String::from("/some/other/path")),
gitea_url: Some(String::from("fake-url")), gitea_url: Some(String::from("fake-url")),
..PartialConfig::default() ..PartialConfig::default()
}; };