Einkaufslisten anzeigen, Datenbankeinbindung

This commit is contained in:
Lukas Nowy
2018-10-27 01:10:46 +02:00
parent 5e3c83707f
commit 8e7d96310f
425 changed files with 77158 additions and 3 deletions

View File

@ -0,0 +1,19 @@
'use strict'
const Cursor = require('pg-cursor')
const expect = require('expect.js')
const describe = require('mocha').describe
const it = require('mocha').it
const Pool = require('../')
describe('submittle', () => {
it('is returned from the query method', false, (done) => {
const pool = new Pool()
const cursor = pool.query(new Cursor('SELECT * from generate_series(0, 1000)'))
cursor.read((err, rows) => {
expect(err).to.be(undefined)
expect(!!rows).to.be.ok()
cursor.close(done)
})
})
})