Skip to content

Commit

Permalink
Fix expected string in test
Browse files Browse the repository at this point in the history
  • Loading branch information
breathx committed Jan 12, 2024
1 parent a56e2ec commit 7299575
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pallets/gear/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8341,22 +8341,19 @@ fn call_forbidden_function() {

run_to_block(2, None);

let res = Gear::calculate_gas_info(
let err = Gear::calculate_gas_info(
USER_1.into_origin(),
HandleKind::Handle(prog_id),
EMPTY_PAYLOAD.to_vec(),
0,
true,
true,
);
)
.expect_err("Must return error");

assert_eq!(
res,
Err(format!(
"Program terminated with a trap: {}",
TrapExplanation::ForbiddenFunction,
))
);
let trap = TrapExplanation::ForbiddenFunction;

assert_eq!(err, format!("Program terminated with a trap: '{trap}'"));
});
}

Expand Down

0 comments on commit 7299575

Please sign in to comment.