Test AJAX response using query to fetch blocks corresponding to building.