Add test for viewTemplate 

Depends on #1278