select: Write tests on templates

Close #783