Another quick note: we want to mock $.ajax because the jQuery people have already tested it for us, and it has been battle tested. We know that it works, so we can rely on it working. What you want to actually test is that the code you wrote behaves appropriately when $.ajax successfully (or unsuccessfully) makes a call. You can test things like: 1. Did you send in the right url and data params? 2. Does your success method work? 3. Does your error method work?