xhr: Wrote tests for xhr.js

- [ ] @davestein
You should also check it was called with the response. Save that guy off like I mentioned above, within the scope of this `it`.