Skip to content

Commit

Permalink
fixed a replace all mistake
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
  • Loading branch information
muraca committed Feb 19, 2024
1 parent 9d21e58 commit 4c4f146
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions substrate/frame/examples/basic/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ fn it_works_for_optional_value() {
// Check that GenesisBuilder works properly.
let val1 = 42;
let val2 = 27;
assert_eq!Dummy::<Test>::get(), Some(val1));
assert_eq!(Dummy::<Test>::get(), Some(val1));

// Check that accumulate works when we have Some value in Dummy already.
assert_ok!(Example::accumulate_dummy(RuntimeOrigin::signed(1), val2));
assert_eq!Dummy::<Test>::get(), Some(val1 + val2));
assert_eq!(Dummy::<Test>::get(), Some(val1 + val2));

// Check that accumulate works when we Dummy has None in it.
<Example as OnInitialize<u64>>::on_initialize(2);
assert_ok!(Example::accumulate_dummy(RuntimeOrigin::signed(1), val1));
assert_eq!Dummy::<Test>::get(), Some(val1 + val2 + val1));
assert_eq!(Dummy::<Test>::get(), Some(val1 + val2 + val1));
});
}

Expand All @@ -146,7 +146,7 @@ fn set_dummy_works() {
new_test_ext().execute_with(|| {
let test_val = 133;
assert_ok!(Example::set_dummy(RuntimeOrigin::root(), test_val.into()));
assert_eq!Dummy::<Test>::get(), Some(test_val));
assert_eq!(Dummy::<Test>::get(), Some(test_val));
});
}

Expand Down

0 comments on commit 4c4f146

Please sign in to comment.