mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Require Alliance Initialisation Before Joining (#11917)
* require alliance initialisation before joining * use noop * make one definition of initialization * rename event * add todo comment * update doc
This commit is contained in:
@@ -26,7 +26,7 @@ pub use sp_runtime::{
|
||||
use sp_std::convert::{TryFrom, TryInto};
|
||||
|
||||
pub use frame_support::{
|
||||
assert_ok, ord_parameter_types, parameter_types,
|
||||
assert_noop, assert_ok, ord_parameter_types, parameter_types,
|
||||
traits::{EitherOfDiverse, GenesisBuild, SortedMembers},
|
||||
BoundedVec,
|
||||
};
|
||||
@@ -291,6 +291,12 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
assert_ok!(Identity::provide_judgement(Origin::signed(1), 0, 5, Judgement::KnownGood));
|
||||
assert_ok!(Identity::set_identity(Origin::signed(6), Box::new(info.clone())));
|
||||
|
||||
// Joining before init should fail.
|
||||
assert_noop!(
|
||||
Alliance::join_alliance(Origin::signed(1)),
|
||||
Error::<Test, ()>::AllianceNotYetInitialized
|
||||
);
|
||||
|
||||
assert_ok!(Alliance::init_members(Origin::root(), vec![1, 2], vec![3], vec![]));
|
||||
|
||||
System::set_block_number(1);
|
||||
|
||||
Reference in New Issue
Block a user