diff --git a/runtime/gdev/tests/common/mod.rs b/runtime/gdev/tests/common/mod.rs index 66b0a2da0cf6d37fca92fd8f199ab103af3e9d16..2ad0ff20597c85721fc5e01e47676a5fdbc15c53 100644 --- a/runtime/gdev/tests/common/mod.rs +++ b/runtime/gdev/tests/common/mod.rs @@ -141,6 +141,16 @@ impl ExtBuilder { self }*/ + pub fn change_parameters< + F: Fn(&mut pallet_duniter_test_parameters::Parameters<u32, u32, Balance>) -> (), + >( + mut self, + f: F, + ) -> Self { + f(&mut self.parameters); + self + } + pub fn build(self) -> sp_io::TestExternalities { let Self { initial_accounts, diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index acb895ca9081277b0e785680baea66f016558e98..b0525631426e8af64849354f58e5a3d75dd0af12 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -1227,3 +1227,14 @@ fn test_new_account_linked() { ); }) } +#[test] +fn smith_data_problem() { + ExtBuilder::new(1, 3, 4) + .change_parameters(|parameters| { + parameters.smith_cert_validity_period = 3; + }) + .build() + .execute_with(|| { + run_to_block(4); + }); +}