json and mock ajax tests