Skip to content

Commit

Permalink
Add membership test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Oct 9, 2023
1 parent 43eba04 commit a143d32
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions runtime/common/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,20 @@ macro_rules! impl_governance_tests {
// Values
assert_eq!(<<Runtime as pallet_treasury::Config>::MaxApprovals as Get<u32>>::get(), 100);
}

#[test]
fn membership_setting_correctly() {
// Origins
assert_type_eq_all!(<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::AddOrigin, Root);
assert_type_eq_all!(<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::MembershipChanged, TechnicalCommittee);
assert_type_eq_all!(<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::MembershipInitialized, TechnicalCommittee);
assert_type_eq_all!(<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::PrimeOrigin, Root);
assert_type_eq_all!(<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::RemoveOrigin, Root);
assert_type_eq_all!(<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::ResetOrigin, Root);
assert_type_eq_all!(<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::SwapOrigin, Root);
// Values
assert_eq!(<<Runtime as pallet_membership::Config<pallet_membership::Instance1>>::MaxMembers as Get<u32>>::get(), COLLECTIVE_MAX_MEMBERS);
}
}
}
}
Expand Down

0 comments on commit a143d32

Please sign in to comment.