Stub log output in public-key integration test

This commit is contained in:
Tankred Hase 2017-08-17 19:28:08 +08:00
parent 95ff2d9247
commit 7d3a64c84d

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
const log = require('npmlog');
const config = require('config'); const config = require('config');
const nodemailer = require('nodemailer'); const nodemailer = require('nodemailer');
const Email = require('../../src/email/email'); const Email = require('../../src/email/email');
@ -28,6 +29,7 @@ describe('Public Key Integration Tests', function() {
before(async () => { before(async () => {
publicKeyArmored = require('fs').readFileSync(`${__dirname}/../key3.asc`, 'utf8'); publicKeyArmored = require('fs').readFileSync(`${__dirname}/../key3.asc`, 'utf8');
publicKeyArmored2 = require('fs').readFileSync(`${__dirname}/../key4.asc`, 'utf8'); publicKeyArmored2 = require('fs').readFileSync(`${__dirname}/../key4.asc`, 'utf8');
sinon.stub(log, 'info');
mongo = new Mongo(); mongo = new Mongo();
await mongo.init(config.mongo); await mongo.init(config.mongo);
}); });
@ -67,6 +69,7 @@ describe('Public Key Integration Tests', function() {
after(async () => { after(async () => {
await mongo.clear(DB_TYPE); await mongo.clear(DB_TYPE);
await mongo.disconnect(); await mongo.disconnect();
log.info.restore();
}); });
describe('put', () => { describe('put', () => {