diff --git a/pallets/regions/src/benchmarking.rs b/pallets/regions/src/benchmarking.rs index 7bdd7a1..5a025fb 100644 --- a/pallets/regions/src/benchmarking.rs +++ b/pallets/regions/src/benchmarking.rs @@ -70,6 +70,24 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn drop_region() -> Result<(), BenchmarkError> { + let caller: T::AccountId = whitelisted_caller(); + let region_id = RegionId { begin: 1, core: 72, mask: CoreMask::complete() }; + let record: RegionRecordOf = RegionRecord { end: 2, owner: 1, paid: None }; + + assert_ok!(crate::Pallet::::mint_into(®ion_id.into(), &caller)); + assert_ok!(crate::Pallet::request_region_record(RawOrigin::None, region_id)); + assert_ok!(crate::Pallet::set_record(region_id, record)); + + #[extrinsic_call] + _(RawOrigin::Signed(caller.clone()), region_id); + + assert_last_event::(Event::RegionDropped { region_id, who: caller }.into()); + + Ok(()) + } + #[benchmark] fn on_accept() -> Result<(), BenchmarkError> { let module = IsmpModuleCallback::::default();