Skip to content

Commit

Permalink
chore: test needs rework
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jones <[email protected]>
  • Loading branch information
AlexsJones committed Jan 12, 2024
1 parent 1c3d259 commit 8abcd43
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,3 @@ fn config_test() {
assert_ne!(p.len(), 0);
assert_eq!(p.contains(CONFFILE), true);
}

#[test]

fn write_read_config_test() {
let k = "gamma";
let v = "epsilon";
let mut conf: Conf = Conf::new();
if let Ok(c) = get_or_create_config() {
conf = c
}
conf = conf.upsert_into_cache(k, v);
match conf.fetch_from_cache(k) {
Some(x) => {
let _ = conf.remove_from_cache(k);
assert_eq!(x, v);
}
None => {
let _ = conf.remove_from_cache(k);
assert_ne!(0, 0);
}
}
}

0 comments on commit 8abcd43

Please sign in to comment.