link: Write tests on templates

Close #770