added more tests to template.rs