updated tests for new promise resolution value
This commit is contained in:
@ -733,7 +733,7 @@ describe('Transport Class', function () {
|
|||||||
ret.should.be.exactly(fakePromise);
|
ret.should.be.exactly(fakePromise);
|
||||||
ret.abort.should.have.type('function');
|
ret.abort.should.have.type('function');
|
||||||
});
|
});
|
||||||
it('resolves the promise it returns with an object containing status and body keys', function (done) {
|
it('resolves the promise it with the response body', function (done) {
|
||||||
var serverMock = nock('http://esbox.1.com')
|
var serverMock = nock('http://esbox.1.com')
|
||||||
.get('/')
|
.get('/')
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
@ -746,10 +746,7 @@ describe('Transport Class', function () {
|
|||||||
|
|
||||||
tran.request({}).then(function (resp) {
|
tran.request({}).then(function (resp) {
|
||||||
resp.should.eql({
|
resp.should.eql({
|
||||||
body: {
|
good: 'day'
|
||||||
good: 'day'
|
|
||||||
},
|
|
||||||
status: 200
|
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user