Skip to content

Commit 74d3739

Browse files
committed
test: enum with quoted name
1 parent 054a45c commit 74d3739

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/integration/index.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@ describe('/tables', async () => {
266266
assert.equal(true, !!datum)
267267
assert.equal(true, !!included)
268268
})
269+
it('GET enum /columns with quoted name', async () => {
270+
await axios.post(`${URL}/query`, { query: 'CREATE TYPE "T" AS ENUM (\'v\'); CREATE TABLE t ( c "T" );' })
271+
const { data: columns } = await axios.get(`${URL}/columns`)
272+
const column = columns.find((x) => x.table == 't')
273+
await axios.post(`${URL}/query`, { query: 'DROP TABLE t; DROP TYPE "T";' })
274+
assert.deepStrictEqual(column.enums.includes('v'), true)
275+
})
269276
it('POST /tables should create a table', async () => {
270277
const { data: newTable } = await axios.post(`${URL}/tables`, { name: 'test', comment: 'foo' })
271278
assert.equal(`${newTable.schema}.${newTable.name}`, 'public.test')

0 commit comments

Comments
 (0)