Brian C 28ac2a17bc
Add test for how to set search path (#2700)
Also refactor a few tests a bit to slowly clean up some of the old style.
2022-05-12 22:00:00 -05:00

15 lines
415 B
JavaScript

const helper = require('../test-helper')
const suite = new helper.Suite()
suite.testAsync('it sets search_path on connection', async () => {
const client = new helper.pg.Client({
options: '--search_path=foo',
})
await client.connect()
const { rows } = await client.query('SHOW search_path')
assert.strictEqual(rows.length, 1)
assert.strictEqual(rows[0].search_path, 'foo')
await client.end()
})