icon: Write tests on templates

Close #759.