Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sczembor authored Oct 31, 2023
1 parent 3b233a9 commit 7f19990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/human_checker/tests/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async fn is_human_call() -> anyhow::Result<()> {
};

// Call using Alice. Should register tokens, because Alice is a human
let r = suite.is_human_call(&alice, &payload, ONE_NEAR).await?;
let r = suite.is_human_call(&alice, &payload, 2 * ONE_NEAR).await?;
assert!(r.is_success());
let result: bool = r.json()?; // the final receipt is register_human_token, which return boolean
assert!(result, "should register tokens to alice");
Expand All @@ -160,15 +160,15 @@ async fn is_human_call() -> anyhow::Result<()> {

// call the is_human_call method with bob (has sbts but not a human)
// should panic in the human_checker
let r = suite.is_human_call(&bob, &payload, ONE_NEAR).await?;
let r = suite.is_human_call(&bob, &payload, 2 * ONE_NEAR).await?;
assert!(r.is_failure());

tokens = suite.query_sbts(&bob).await?;
assert_eq!(tokens, None);

// call the is_human_call method john (doesn't have sbts)
// should panic in the registry
let r = suite.is_human_call(&john, &payload, ONE_NEAR).await?;
let r = suite.is_human_call(&john, &payload, 2 * ONE_NEAR).await?;
assert!(r.is_failure());

tokens = suite.query_sbts(&john).await?;
Expand Down

0 comments on commit 7f19990

Please sign in to comment.