input: Write tests on templates

Close #924