Skip to content

Commit d6525bf

Browse files
committed
refactor(test): types
1 parent 9407752 commit d6525bf

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

frame/ranked-collective/src/tests.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,8 @@ parameter_types! {
182182
impl Config for Test {
183183
type WeightInfo = ();
184184
type RuntimeEvent = RuntimeEvent;
185-
type AddOrigin = EitherOf<
186-
// Root can add arbitrarily.
187-
frame_system::EnsureRoot<Self::AccountId>,
188-
// Members with rank 2 and above can add.
189-
MapSuccess<EnsureRanked<Test, (), 2>, ReplaceWithDefaultFor<()>>,
190-
>;
191-
type RemoveOrigin = EitherOf<
192-
// Root can remove arbitrarily.
193-
frame_system::EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
194-
// Members can remove up to the rank of 3 below them.
195-
MapSuccess<EnsureRanked<Test, (), 3>, ReduceBy<ConstU16<3>>>,
196-
>;
185+
type AddOrigin = MapSuccess<Self::PromoteOrigin, ReplaceWithDefaultFor<()>>;
186+
type RemoveOrigin = Self::DemoteOrigin;
197187
type PromoteOrigin = EitherOf<
198188
// Root can promote arbitrarily.
199189
frame_system::EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,

0 commit comments

Comments
 (0)