Skip to content

Commit

Permalink
add a test for reward schedule repeated refund claim
Browse files Browse the repository at this point in the history
  • Loading branch information
betterclever committed Feb 7, 2024
1 parent fa4395a commit a712604
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contracts/governance_admin/tests/reward-schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,17 @@ impl<'a> RewardScheduleTestSuite<'a> {
refund_block_height: self.persistence.get_block_height() as u64,
}
);

// try claiming refund again, it should fail
let res = self.claim_refund(reward_schedule_request_id);
assert!(res.is_err());
let error = res.unwrap_err();
let expected_err = format!(
"execute error: failed to execute message; message index: 0: Funds already claimed for this request at block height: {}: execute wasm contract failed",
self.persistence.get_block_height() - 1,
);

assert_eq!(error.to_string(), expected_err);
}

fn allow_lp_token(&self) {
Expand Down

0 comments on commit a712604

Please sign in to comment.