button: Write tests on templates

Close #768