json is handled correctly', function() {
          server.restore();
          var ajax = fixture('RealPost');
          ajax.body = JSON.stringify({a: 'foo', b: 'bar'});
          ajax.contentType = 'application/json';
          return ajax.generateRequest().completes.then(function() {
            expect(ajax.lastResponse.headers['Content-Type']).to.match(
                /^application\/json(;.*)?$/);
            expect(ajax.lastResponse.json.a).to.be.equal('foo');
            expect(ajax.lastResponse.json