Added test for IndexController
Fixed if-clause in template