, body attribute is an object', function() {
            ajax.setAttribute('body', '{"foo": "bar baz", "x": 1}');
            ajax.contentType = 'application/x-www-form-urlencoded';
            ajax.generateRequest();

            expect(server.requests[0]).to.be.ok;
            expect(server.requests[0].requestBody).to.be.equal(
                'foo=bar+baz&x=1');
          });
        });

        suite('and `contentType` is explicitly set to form encode', function() {
          test('we encode a custom o