1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-13 23:25:58 +00:00

Something is up

This commit is contained in:
Scott Tolksdorf
2017-01-05 20:49:45 -05:00
parent 537a75b2ab
commit 3dc4c13178
8 changed files with 79 additions and 65 deletions

View File

@@ -1,26 +1,38 @@
const testing = require('./test.init.js');
const should = testing.should;
const should = require('chai').use(require('chai-as-promised')).should();
const BrewDB = require('../server/db.js');
const BrewData = require('../server/brew.data.js');
const BrewDB = require('../server/brew.data.js');
describe('BrewDB', () => {
describe.skip('BrewDB', () => {
before('Await DB', ()=>{
return require('db.js').connect();
return BrewDB.connect()
.then(()=>{
console.log('connected');
})
.catch(()=>{
console.log('sdfdsfdsfdsf');
})
});
it('generates ID on save', () => {
return BrewDB.create({
it('generates ID on save', (done) => {
console.log('getting here');
return BrewData.create({
text : "Brew Text"
}).then((brew) => {
console.log('here2');
should.exist(brew);
brew.should.have.property('editId').that.is.a('string');
brew.should.have.property('shareId').that.is.a('string');
brew.should.have.property('text').that.is.a('string');
});
console.log('and I am done');
done();
})
.catch((e) => {
console.log('an error', e);
})
});
});