Improve test coverage of template tags