Improve test coverage for index controller.