check mock for call to ajax