added a test for the index controller to check that views are handled correctly