Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Nov 15, 2024
1 parent 49fc433 commit 6d45f08
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions crates/tests/src/integration/ledger_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,41 @@ fn proposal_submission() -> Result<()> {
assert!(captured.result.is_err());
assert!(captured.err_contains(r"The account .* has no active delegations"));

// add another delegation for bertha
let tx_args = apply_use_device(vec![
"bond",
"--validator",
"validator-1-validator",
"--source",
BERTHA,
"--amount",
"500",
"--node",
&validator_one_rpc,
]);
let captured = CapturedOutput::of(|| run(&node, Bin::Client, tx_args));
assert_matches!(captured.result, Ok(_));
assert!(captured.contains(TX_APPLIED_SUCCESS));

// resend vote from bertha
let submit_proposal_vote_delegator = apply_use_device(vec![
"vote-proposal",
"--proposal-id",
"0",
"--vote",
"nay",
"--address",
BERTHA,
"--node",
&validator_one_rpc,
]);

let captured = CapturedOutput::of(|| {
run(&node, Bin::Client, submit_proposal_vote_delegator)
});
assert_matches!(captured.result, Ok(_));
assert!(captured.contains(TX_APPLIED_SUCCESS));

// 11. Query the proposal and check the result
while node.current_epoch().0 <= 25 {
node.next_epoch();
Expand Down

0 comments on commit 6d45f08

Please sign in to comment.