Skip to content

Commit

Permalink
Test default configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tbsklg committed Aug 17, 2024
1 parent a9ec5ef commit 0640070
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cli-client/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ mod tests {
);
}

#[test]
fn parse_default_config() {
std::env::set_var("HOME", "/home/user");

let configuration = get_configuration(PathBuf::from("tests/fixtures/empty_config.yaml"))
.unwrap_or_default();


assert_eq!(
configuration.local.unwrap().db_path,
PathBuf::from("/home/user/.strikes/db.json")
);
}

#[test]
#[should_panic]
fn parse_invalid_config() {
Expand Down

0 comments on commit 0640070

Please sign in to comment.