From 2d1a3b9ba7fe2bc6d5c32746726e855924dc5add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 21 Dec 2021 11:26:20 +0100 Subject: [PATCH] better test of list_roots --- src/database/hierarchies.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/database/hierarchies.rs b/src/database/hierarchies.rs index b53940c..da59d4e 100644 --- a/src/database/hierarchies.rs +++ b/src/database/hierarchies.rs @@ -340,6 +340,7 @@ mod tests { true, ); assert!(foo_result.is_ok()); + let foo_result = foo_result.unwrap(); let bar_result = fetch_or_create_dir( &open_result.pool.get().unwrap(), @@ -359,9 +360,8 @@ mod tests { assert!(baz_result.is_ok()); let baz_result = baz_result.unwrap(); - let orphans = list_roots(&open_result.pool.get().unwrap()); - assert!(orphans.is_ok()); - assert_eq!(orphans.unwrap().len(), 2); + let roots = list_roots(&open_result.pool.get().unwrap()); + assert_eq!(roots.unwrap(), [foo_result, bar_result.clone()]); let resolve_result = resolve_path( &open_result.pool.get().unwrap(),