Permalink
Browse files

updated; test suite

  • Loading branch information...
1 parent 22db302 commit d0545da5d01d5a099cb81a4fe23b945d8396b06e @wavded committed Jun 14, 2012
Showing with 4 additions and 15 deletions.
  1. +0 −1 lib/winston-mail.js
  2. +0 −8 test/fixtures/test-config.json
  3. +4 −6 test/winston-mail-test.js
View
@@ -81,7 +81,6 @@ Mail.prototype.log = function (level, msg, meta, callback) {
});
this.server.send(message, function (err) {
- console.log(err);
if (err) self.emit('error', err);
self.emit('logged');
callback(null, true);
@@ -1,8 +0,0 @@
-{
- "transports": {
- "mail": {
- "to": "wavded@gmail.com",
- "port": 2500
- }
- }
-}
@@ -11,17 +11,15 @@ var helpers = require('winston/test/helpers');
var smtp = require('simplesmtp').createServer();
var Mail = require('../lib/winston-mail').Mail;
-smtp.listen(2500, function (err) {
- console.log(arguments)
-})
+smtp.listen(2500, function (err) { if (err) console.log(err); });
+smtp.on('dataReady', function (env, cb) { cb(null, 'abc'); });
function assertMail (transport) {
assert.instanceOf(transport, Mail);
assert.isFunction(transport.log);
-};
+}
-var config = helpers.loadConfig(__dirname)
-var transport = new (Mail)(config.transports.mail);
+var transport = new (Mail)({ to: 'wavded@gmail.com', from: 'dev@server.com', port: 2500 });
vows.describe('winston-mail').addBatch({
"An instance of the Mail Transport": {

0 comments on commit d0545da

Please sign in to comment.