Skip to content

Commit

Permalink
fix test skipping genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
juangirini committed Nov 24, 2023
1 parent 4d7020c commit 1955b38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions developer-hub/src/guides/your_first_pallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Runtime>::transfer(RuntimeOrigin::signed(1), 2, 50));

Expand Down

0 comments on commit 1955b38

Please sign in to comment.