File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,13 @@ describe('/tables', async () => {
266
266
assert . equal ( true , ! ! datum )
267
267
assert . equal ( true , ! ! included )
268
268
} )
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
+ } )
269
276
it ( 'POST /tables should create a table' , async ( ) => {
270
277
const { data : newTable } = await axios . post ( `${ URL } /tables` , { name : 'test' , comment : 'foo' } )
271
278
assert . equal ( `${ newTable . schema } .${ newTable . name } ` , 'public.test' )
You can’t perform that action at this time.
0 commit comments