image: Write tests on templates