'use strict';
var assert = require('assert');

describe('Invoice', function() {
  beforeEach(function(done) {
    // TODO: connect to db and provide a handle to it
    done();
  });

  it('should be able to create an invoice', function(done) {
    // TODO
    console.log('should be able to create an invoice');

    assert(false);

    done();
  });

  // TODO: test transformations etc.
});

'use strict';
var assert = require('assert');

var config = require('../config');

config.database.test.logging = noop;

var models = require('../models')(config.database.test);
var Invoice = models.Invoice;

describe('Invoice', function() {
  beforeEach(function(done) {
    // nuke possible db
    models.sequelize.sync({force: true}).finally(done);
  });

  it('should be able to create an invoice', function(done) {
    // TODO
    console.log('should be able to create an invoice');

    Invoice.create().then(function(result) {
      done();
    }).catch(done);
  });

  // TODO: test transformations etc.
});

function noop() {}

Connect to database before testing and nuke db before each
Connect to database before testing and nuke db before each
