Added a test for api index view