Fix broken tests
This commit is contained in:
parent
14d8bbab00
commit
cb43f34138
|
@ -74,14 +74,14 @@ describe("Connection", function() {
|
||||||
describe("#disconnect", function() {
|
describe("#disconnect", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
stub(Logger, 'info').returns(true);
|
stub(Logger, 'info').returns(true);
|
||||||
stub(connection.adaptor, 'disconnect').returns(true);
|
|
||||||
stub(connection, 'removeAllListeners');
|
stub(connection, 'removeAllListeners');
|
||||||
|
|
||||||
|
connection.adaptor.disconnect = stub().returns(true);
|
||||||
|
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
connection.adaptor.disconnect.restore();
|
|
||||||
connection.removeAllListeners.restore();
|
connection.removeAllListeners.restore();
|
||||||
Logger.info.restore();
|
Logger.info.restore();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue