Add tests for api module

Write tests for axios requests located in the api module.