Skip to content

Commit

Permalink
test(update_search_history): improve clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmesyde committed Nov 15, 2023
1 parent 37d8820 commit 9f32c3d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/unit_tests/ctx/update_search_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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::<TestEnv, _>::new(
Expand All @@ -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(),
}],
})),
})
Expand Down

0 comments on commit 9f32c3d

Please sign in to comment.