Skip to content

Commit 17108d6

Browse files
committed
More tests
1 parent bb6904d commit 17108d6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

substrate/frame/staking/src/tests.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
//! Tests for the module.
1919
20-
use core::iter::empty;
20+
use core::iter::{empty, once};
2121

2222
use super::{ConfigOp, Event, MaxUnlockingChunks, *};
2323
use frame_election_provider_support::{ElectionProvider, SortedListProvider, Support};
@@ -440,6 +440,13 @@ fn whitelist_works() {
440440
Staking::validate(Origin::signed(10), ValidatorPrefs::default()),
441441
Error::<Test>::NotInAWhitelist
442442
);
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+
),);
443450
})
444451
}
445452

0 commit comments

Comments
 (0)