erver.requests[0].requestBody).to.be.equal(
              'foo=bar%0D%0Abip&biz+bo=baz+blar');
        });

        test('if `contentType` is json, the body is json encoded', function() {
          var requestObj = {foo: 'bar', baz: [1,2,3]}
          ajax.body = requestObj;
          ajax.contentType = 'application/json';
          ajax.generateRequest();

          expect(server.requests[0]).to.be.ok;
          expect(server.requests[0].requestBody).to.be.equal(
              JSON.stringify(requestObj));
