Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Dec 2, 2021
1 parent 2f1e40e commit e3c0b18
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,15 @@ mod fetch_total_size_stats {
use super::*;

#[test]
fn it_works_when_db_is_empty() {
fn it_measures_the_number_of_entries() {
let db = setup();
let _ = add_many_chained_blocks(2, &db);
let stats = db.fetch_total_size_stats().unwrap();
// Returns one per db
assert_eq!(stats.sizes().len(), 20);
assert_eq!(
stats.sizes().iter().find(|s| s.name == "utxo_db").unwrap().num_entries,
2
);
}
}

Expand Down

0 comments on commit e3c0b18

Please sign in to comment.