mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-22 07:21:29 +00:00
Split off app into own file
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
const should = require('chai').use(require('chai-as-promised')).should();
|
||||
const testing = require('./test.init.js');
|
||||
|
||||
const BrewDB = require('../server/db.js');
|
||||
const BrewData = require('../server/brew.data.js');
|
||||
const BrewDB = require('db.js');
|
||||
const BrewData = require('brew.data.js');
|
||||
|
||||
|
||||
describe('BrewDB', () => {
|
||||
before('Await DB', ()=>{
|
||||
return BrewDB.connect().catch()
|
||||
return BrewDB.connect()
|
||||
});
|
||||
|
||||
it('generates ID on save', () => {
|
||||
return BrewData.create({
|
||||
text : "Brew Text"
|
||||
}).then((brew) => {
|
||||
should.exist(brew);
|
||||
//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');
|
||||
|
||||
Reference in New Issue
Block a user