Skip to content

Commit

Permalink
test for is_claimable
Browse files Browse the repository at this point in the history
  • Loading branch information
mubarak23 committed Apr 22, 2024
1 parent d906c97 commit 32359bd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions onchain/src/tests/template_quest.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,20 @@ fn test_get_reward() {

assert(current_reward == test_reward, 'Reward Not set');
}


fn SINGLE_CALLDATA() -> Span<felt252> {
array![1].span()
}

#[test]
fn test_is_claimable() {
let contract_address = deploy_contract();
let dispatcher = IQuestDispatcher { contract_address };
let test_is_claim = dispatcher.is_claimable(contract_address_const::<1>(), SINGLE_CALLDATA());

let is_claim = false;

assert(is_claim == test_is_claim, 'Template not claim');
}

0 comments on commit 32359bd

Please sign in to comment.