diff --git a/templates/new/lib.rs b/templates/new/lib.rs index c81744f882d3a6d40682656220c434b7cc3ccf78..45c4c5edd806a5c986f96fe054845f890b5a6e4e 100644 --- a/templates/new/lib.rs +++ b/templates/new/lib.rs @@ -52,15 +52,18 @@ mod {{name}} { /// Imports all the definitions from the outer scope so we can use them here. use super::*; + /// Imports `ink_lang` so we can use `#[ink::test]`. + use ink_lang as ink; + /// We test if the default constructor does its job. - #[test] + #[ink::test] fn default_works() { let {{name}} = {{camel_name}}::default(); assert_eq!({{name}}.get(), false); } /// We test a simple use case of our contract. - #[test] + #[ink::test] fn it_works() { let mut {{name}} = {{camel_name}}::new(false); assert_eq!({{name}}.get(), false);