[transport] update tests to check 391f228
This commit is contained in:
@ -162,7 +162,7 @@ describe('Transport Class', function () {
|
|||||||
|
|
||||||
expect(trans).to.have.property('sniffedNodesProtocol', 'https');
|
expect(trans).to.have.property('sniffedNodesProtocol', 'https');
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
describe('host config', function () {
|
describe('host config', function () {
|
||||||
it('rejects non-strings/objects', function () {
|
it('rejects non-strings/objects', function () {
|
||||||
@ -483,6 +483,7 @@ describe('Transport Class', function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
stub(conn, 'request', function (params) {
|
stub(conn, 'request', function (params) {
|
||||||
|
expect(params.headers).to.have.property('content-type', 'application/json');
|
||||||
expect(JSON.parse(params.body)).to.eql(body);
|
expect(JSON.parse(params.body)).to.eql(body);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -502,6 +503,7 @@ describe('Transport Class', function () {
|
|||||||
];
|
];
|
||||||
|
|
||||||
stub(conn, 'request', function (params) {
|
stub(conn, 'request', function (params) {
|
||||||
|
expect(params.headers).to.have.property('content-type', 'application/x-ldjson');
|
||||||
expect(params.body).to.eql(
|
expect(params.body).to.eql(
|
||||||
'{"_id":"simple body"}\n' +
|
'{"_id":"simple body"}\n' +
|
||||||
'{"name":"ഢധയമബ"}\n'
|
'{"name":"ഢധയമബ"}\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user