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 1690e0a49b08d200b72495abf7d834fb9733d88c..c7438ebbd8e8edadd6db9a417d90824f723de13b 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -1256,3 +1256,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); + }); +}