From 9f32c3d4f201a333f4e02e8ea5d1194e605d154d Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 15 Nov 2023 14:49:13 +0100 Subject: [PATCH] test(update_search_history): improve clarity --- src/unit_tests/ctx/update_search_history.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/unit_tests/ctx/update_search_history.rs b/src/unit_tests/ctx/update_search_history.rs index 11271364d..6a9e9cc52 100644 --- a/src/unit_tests/ctx/update_search_history.rs +++ b/src/unit_tests/ctx/update_search_history.rs @@ -28,8 +28,6 @@ fn test_search_history_update() { let _env_mutex = TestEnv::reset().expect("Should have exclusive lock to TestEnv"); - let search_history = SearchHistoryBucket::default(); - let ctx = Ctx::new( Profile::default(), LibraryBucket::default(), @@ -42,7 +40,7 @@ fn test_search_history_update() { STORAGE.write().unwrap().insert( SEARCH_HISTORY_STORAGE_KEY.to_owned(), - serde_json::to_string(&search_history).unwrap(), + serde_json::to_string(&ctx.search_history).unwrap(), ); let (runtime, _rx) = Runtime::::new( @@ -64,7 +62,7 @@ fn test_search_history_update() { r#type: None, extra: vec![ExtraValue { name: "search".to_owned(), - value: "superman".to_owned(), + value: query.to_owned(), }], })), })