diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 55eba276c9e109c554822c1766bc5ddb19eedb7d..cfc3cb05d3e533518bb32eb7768a12de8cd09a55 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -484,8 +484,7 @@ fn test_identity_creation_workflow() { // block time is 6_000 ms // ud creation period is 60_000 ms ~ 10 blocks // first ud is at 24_000 ms ~ 4 blocks - // at block 75 this should be the UD number 7, so next is 8 not 9 - // FIXME wrong UD count + // at block 75 this is UD number 8, so next is 9 first_eligible_ud: pallet_universal_dividend::FirstEligibleUd(Some( sp_std::num::NonZeroU16::new(9).unwrap() )) @@ -497,6 +496,26 @@ fn test_identity_creation_workflow() { status: pallet_identity::IdtyStatus::Member, }) ); + + run_to_block(84); + System::assert_has_event(RuntimeEvent::UniversalDividend( + pallet_universal_dividend::Event::NewUdCreated { + amount: 1000, + index: 9, + monetary_mass: 50_000, // 13_000 (initial) + 4 * 1000 * 8 (produced) + 5000 + members_count: 5, + }, + )); + assert_ok!(UniversalDividend::claim_uds( + frame_system::RawOrigin::Signed(AccountKeyring::Eve.to_account_id()).into(), + )); + System::assert_has_event(RuntimeEvent::UniversalDividend( + pallet_universal_dividend::Event::UdsClaimed { + count: 1, + total: 1000, + who: AccountKeyring::Eve.to_account_id(), + }, + )); }); }