Testing and templates for angularjs application