mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 14:01:06 +00:00
Introduce cancel_proposal to rid us of those pesky proposals (#7111)
* Introduce `cancel_proposal` Also fix proposal weight. * Support proposal cancellation from runtime. * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fix benchmarks * fix benchmark * whitelisted caller weights * fix build * Fixes * Fixes * Fixes * Fixes * Update frame/democracy/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Fixes * Fixes * Fixes * Fixes * Fixes * doc updates * new weights Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -79,6 +79,32 @@ fn veto_external_works() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn external_blacklisting_should_work() {
|
||||
new_test_ext().execute_with(|| {
|
||||
System::set_block_number(0);
|
||||
|
||||
assert_ok!(Democracy::external_propose(
|
||||
Origin::signed(2),
|
||||
set_balance_proposal_hash_and_note(2),
|
||||
));
|
||||
|
||||
let hash = set_balance_proposal_hash(2);
|
||||
assert_ok!(Democracy::blacklist(Origin::root(), hash, None));
|
||||
|
||||
fast_forward_to(2);
|
||||
assert!(Democracy::referendum_status(0).is_err());
|
||||
|
||||
assert_noop!(
|
||||
Democracy::external_propose(
|
||||
Origin::signed(2),
|
||||
set_balance_proposal_hash_and_note(2),
|
||||
),
|
||||
Error::<Test>::ProposalBlacklisted,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn external_referendum_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
|
||||
Reference in New Issue
Block a user