Skip to content

Commit

Permalink
fix unit
Browse files Browse the repository at this point in the history
  • Loading branch information
fbielejec committed Dec 13, 2023
1 parent f38adaf commit 0fe3ce5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azero/contracts/token/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,12 @@ pub mod token {
fn minter_burner_can_burn() {
let mut token = init_contract(INIT_SUPPLY_TEST);
let alice = default_accounts::<E>().alice;
let bob = default_accounts::<E>().bob;
let charlie = default_accounts::<E>().charlie;
let alice_balance_before = token.balance_of(alice);

set_caller::<E>(alice);
assert!(token.approve(charlie, 100).is_ok());

set_caller::<E>(charlie);
assert!(token.burn_from(alice, 100).is_ok());
assert_eq!(token.balance_of(alice), alice_balance_before - 100);
Expand Down

0 comments on commit 0fe3ce5

Please sign in to comment.