improve assertion on ajax test