var assert = require('chai').assert;
var MailerService = require('../');
var StubMailer = require('../lib/StubMailer');

describe('MailerService', function () {
  it('Should properly export', function () {
    assert.isObject(MailerService);
    assert.isFunction(MailerService.create);
    assert.isFunction(MailerService.DirectMailer);
    assert.isFunction(MailerService.SendGridMailer);
    assert.isFunction(MailerService.SendMailMailer);
    assert.isFunction(MailerService.SESMailer);
    assert.isFunction(MailerService.SMTPMailer);
    assert.isFunction(MailerService.StubMailer);
  });

  it('Should properly create mailer instance', function () {
    assert.instanceOf(MailerService.create('stub'), StubMailer);
  });

  it('Should properly send mail', function (done) {
    var stubMailer = MailerService.create('stub', {
      from: 'no-reply@ghaiklor.com'
    });

    stubMailer
      .send({
        to: 'another@mail.com'
      })
      .then(function (result) {
        assert.equal(result.envelope.from, 'no-reply@ghaiklor.com');
        assert.equal(result.envelope.to, 'another@mail.com');
        done();
      })
      .catch(done);
  });
});

@@ -66,16 +66,269 @@
 '../');%0A
+var DirectMailer = require('../lib/DirectMailer');%0Avar SendGridMailer = require('../lib/SendGridMailer');%0Avar SendMailMailer = require('../lib/SendMailMailer');%0Avar SESMailer = require('../lib/SESMailer');%0Avar SMTPMailer = require('../lib/SMTPMailer');%0A
 var Stub
@@ -366,16 +366,16 @@
 iler');%0A
-
 %0Adescrib
@@ -872,16 +872,23 @@
  create 
+all of 
 mailer i
@@ -894,16 +894,17 @@
 instance
+s
 ', funct
@@ -960,25 +960,484 @@
 te('
-stub'), StubMaile
+direct'), DirectMailer);%0A    assert.instanceOf(MailerService.create('sendgrid', %7Btransporter: %7Bauth: %7B%7D%7D%7D), SendGridMailer);%0A    assert.instanceOf(MailerService.create('sendmail'), SendMailMailer);%0A    assert.instanceOf(MailerService.create('ses'), SESMailer);%0A    assert.instanceOf(MailerService.create('smtp'), SMTPMailer);%0A    assert.instanceOf(MailerService.create('stub'), StubMailer);%0A%0A    assert.throw(function () %7B%0A      MailerService.create('NOT_EXISTS');%0A    %7D, Erro
 r);%0A

Improve coverage