Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseAbram committed Sep 26, 2024
1 parent 2374b32 commit e07904e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/threshold-signature-server/src/user/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,13 +699,15 @@ async fn test_request_limit_are_updated_during_signing() {
.header("Content-Type", "application/json")
.body(unsafe_get.clone())
.send()
.await
.unwrap();
let serialized_request_amount = get_response.text().await.unwrap();
.await;

let request_info: RequestLimitStorage =
RequestLimitStorage::decode(&mut serialized_request_amount.as_ref()).unwrap();
assert_eq!(request_info.request_amount, 1);
if get_response.is_ok() {
let serialized_request_amount = get_response.unwrap().text().await.unwrap();

let request_info: RequestLimitStorage =
RequestLimitStorage::decode(&mut serialized_request_amount.as_ref()).unwrap();
assert_eq!(request_info.request_amount, 1);
}

// Test: If we send too many requests though, we'll be blocked from signing

Expand Down

0 comments on commit e07904e

Please sign in to comment.