Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenzing committed Dec 28, 2023
1 parent 45d90a8 commit de478f8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions blockscout-ens/bens-server/tests/domains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,17 @@ async fn expect_list_results(
let mut expected: HashMap<String, Value> =
HashMap::from_iter([("items".to_owned(), json!(expected_items))]);
if let Some((page_size, page_token)) = maybe_expected_paginated {
expected.insert(
"next_page_params".to_owned(),
json!({
"page_token": page_token,
"page_size": page_size,
}),
);
if let Some(page_token) = page_token {
expected.insert(
"next_page_params".to_owned(),
json!({
"page_token": page_token,
"page_size": page_size,
}),
);
} else {
expected.insert("next_page_params".to_owned(), json!(null));
}
}
assert_eq!(request, json!(expected));
}
Expand Down

0 comments on commit de478f8

Please sign in to comment.