We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb6904d commit 17108d6Copy full SHA for 17108d6
substrate/frame/staking/src/tests.rs
@@ -17,7 +17,7 @@
17
18
//! Tests for the module.
19
20
-use core::iter::empty;
+use core::iter::{empty, once};
21
22
use super::{ConfigOp, Event, MaxUnlockingChunks, *};
23
use frame_election_provider_support::{ElectionProvider, SortedListProvider, Support};
@@ -440,6 +440,13 @@ fn whitelist_works() {
440
Staking::validate(Origin::signed(10), ValidatorPrefs::default()),
441
Error::<Test>::NotInAWhitelist
442
);
443
+
444
+ super::Pallet::<Test>::set_whitelist(Origin::root(), Some(once(11).collect())).unwrap();
445
446
+ assert_ok!(Staking::validate(
447
+ Origin::signed(10),
448
+ ValidatorPrefs::default()
449
+ ),);
450
})
451
}
452
0 commit comments