Testing Ajax in an app