Skip to content

Commit

Permalink
fixed a formatting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Jul 20, 2024
1 parent ebfa72f commit 40e60b8
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions server/main-api/src/search/search_executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,30 @@ mod test {
insta::assert_yaml_snapshot!(actual);
});
}
#[tokio::test]
#[tracing_test::traced_test]
async fn test_bad_queries() {
let highlighting = Highlighting::default();
let limits = Limits::default();
for query in TestQuery::load_bad() {
let info = format!(
"{query} should get {target}",
query = query.query,
target = query.target
);
let actual = do_geoentry_search(query.query.clone(), highlighting.clone(), limits)
.await
.0;
assert!(query.actual_matches_among(&actual), "{query} should not be able to get {target}. Since it can't, please move it to .good list, actual={actual:?}", query=query.query, target=query.target);
}

insta::with_settings!({
info => &info,
description => query.comment.unwrap_or_default(),
}, {
insta::assert_yaml_snapshot!(actual);
});
}
#[tokio::test]
#[tracing_test::traced_test]
async fn test_bad_queries() {
let highlighting = Highlighting::default();
let limits = Limits::default();
for query in TestQuery::load_bad() {
let info = format!(
"{query} should get {target}",
query = query.query,
target = query.target
);
let actual = do_geoentry_search(query.query.clone(), highlighting.clone(), limits)
.await
.0;
assert!(query.actual_matches_among(&actual), "{query} should not be able to get {target}. Since it can't, please move it to .good list, actual={actual:?}", query=query.query, target=query.target);

insta::with_settings!({
info => &info,
description => query.comment.unwrap_or_default(),
}, {
insta::assert_yaml_snapshot!(actual);
});
}
}
}

0 comments on commit 40e60b8

Please sign in to comment.