mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 12:45:40 +00:00
Run cargo fmt on the whole code base (#9394)
* Run cargo fmt on the whole code base * Second run * Add CI check * Fix compilation * More unnecessary braces * Handle weights * Use --all * Use correct attributes... * Fix UI tests * AHHHHHHHHH * 🤦 * Docs * Fix compilation * 🤷 * Please stop * 🤦 x 2 * More * make rustfmt.toml consistent with polkadot Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
@@ -24,7 +24,10 @@ fn fast_track_referendum_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
System::set_block_number(0);
|
||||
let h = set_balance_proposal_hash_and_note(2);
|
||||
assert_noop!(Democracy::fast_track(Origin::signed(5), h, 3, 2), Error::<Test>::ProposalMissing);
|
||||
assert_noop!(
|
||||
Democracy::fast_track(Origin::signed(5), h, 3, 2),
|
||||
Error::<Test>::ProposalMissing
|
||||
);
|
||||
assert_ok!(Democracy::external_propose_majority(
|
||||
Origin::signed(3),
|
||||
set_balance_proposal_hash_and_note(2)
|
||||
@@ -49,14 +52,20 @@ fn instant_referendum_works() {
|
||||
new_test_ext().execute_with(|| {
|
||||
System::set_block_number(0);
|
||||
let h = set_balance_proposal_hash_and_note(2);
|
||||
assert_noop!(Democracy::fast_track(Origin::signed(5), h, 3, 2), Error::<Test>::ProposalMissing);
|
||||
assert_noop!(
|
||||
Democracy::fast_track(Origin::signed(5), h, 3, 2),
|
||||
Error::<Test>::ProposalMissing
|
||||
);
|
||||
assert_ok!(Democracy::external_propose_majority(
|
||||
Origin::signed(3),
|
||||
set_balance_proposal_hash_and_note(2)
|
||||
));
|
||||
assert_noop!(Democracy::fast_track(Origin::signed(1), h, 3, 2), BadOrigin);
|
||||
assert_noop!(Democracy::fast_track(Origin::signed(5), h, 1, 0), BadOrigin);
|
||||
assert_noop!(Democracy::fast_track(Origin::signed(6), h, 1, 0), Error::<Test>::InstantNotAllowed);
|
||||
assert_noop!(
|
||||
Democracy::fast_track(Origin::signed(6), h, 1, 0),
|
||||
Error::<Test>::InstantNotAllowed
|
||||
);
|
||||
INSTANT_ALLOWED.with(|v| *v.borrow_mut() = true);
|
||||
assert_ok!(Democracy::fast_track(Origin::signed(6), h, 1, 0));
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user