git.delta.rocks / unique-network / refs/commits / 623e2e26812b

difftreelog

source

pallets/template/src/tests.rs759 Bsourcehistory
1// Tests to be written here2use frame_support::{assert_ok, assert_noop};34// #[test]5// fn it_works_for_default_value() {6// 	new_test_ext().execute_with(|| {7// 		// Just a dummy test for the dummy function `do_something`8// 		// calling the `do_something` function with a value 429// 		assert_ok!(TemplateModule::do_something(Origin::signed(1), 42));10// 		// asserting that the stored value is equal to what we stored11// 		assert_eq!(TemplateModule::something(), Some(42));12// 	});13// }1415// #[test]16// fn correct_error_for_none_value() {17// 	new_test_ext().execute_with(|| {18// 		// Ensure the correct error is thrown on None value19// 		assert_noop!(20// 			TemplateModule::cause_error(Origin::signed(1)),21// 			Error::<Test>::NoneValue22// 		);23// 	});24// }