Added a test for API view