Skip to content

Commit 899df1f

Browse files
author
Peter Svetlichny
committed
test(index): add getTable coverage
1 parent b116619 commit 899df1f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/src/index.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ describe('postgres', () => {
2525
return expect(inst.query('`')).to.be.rejectedWith(Error)
2626
})
2727
})
28+
describe('getTable', () => {
29+
after(() => {
30+
inst.schemaName = null
31+
})
32+
it('concats tableName with schemaName if the latter exists', () => {
33+
inst.schemaName = 'testSchema'
34+
expect(inst.getTable()).to.equal('"testSchema"."foo"')
35+
})
36+
})
2837
describe('createTable', () => {
2938
it('creates a new table based on object passed (if not exists)', () => {
3039
return inst.createTable(fixd.postgres.createTable)

0 commit comments

Comments
 (0)