attach: Write tests on templates