add tests for AJAX calls