Test calls to my api using angular.js