From 1955b38ae26a0768a50b67154d90690e02a504a0 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Fri, 24 Nov 2023 10:21:36 +0100 Subject: [PATCH] fix test skipping genesis --- developer-hub/src/guides/your_first_pallet/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/developer-hub/src/guides/your_first_pallet/mod.rs b/developer-hub/src/guides/your_first_pallet/mod.rs index 91d5ec4a6422..632043244eeb 100644 --- a/developer-hub/src/guides/your_first_pallet/mod.rs +++ b/developer-hub/src/guides/your_first_pallet/mod.rs @@ -715,6 +715,10 @@ pub mod pallet_v2 { #[test] fn transfer_works() { StateBuilder::default().build_and_execute(|| { + // skip the genesis block, as events are not deposited there and we need them for + // the final assertion. + System::set_block_number(1); + // given the the initial state, when: assert_ok!(Pallet::::transfer(RuntimeOrigin::signed(1), 2, 50));