@@ -99,6 +99,12 @@ describe('/schemas', () => {
99
99
assert . equal ( true , ! ! datum )
100
100
assert . equal ( true , ! ! included )
101
101
} )
102
+ it ( 'GET without system schemas (explicit)' , async ( ) => {
103
+ const res = await axios . get ( `${ URL } /schemas?includeSystemSchemas=false` )
104
+ const isIncluded = res . data . some ( ( x ) => x . name === 'pg_catalog' )
105
+ assert . equal ( res . status , STATUS . SUCCESS )
106
+ assert . equal ( isIncluded , false )
107
+ } )
102
108
it ( 'POST & PATCH & DELETE' , async ( ) => {
103
109
const res = await axios . post ( `${ URL } /schemas` , { name : 'api' } )
104
110
assert . equal ( 'api' , res . data . name )
@@ -201,13 +207,12 @@ describe('/tables', async () => {
201
207
assert . equal ( res . status , STATUS . SUCCESS )
202
208
assert . equal ( true , ! ! included )
203
209
} )
204
- // FIXME: Bad handling of query param in /tables & /columns & /schemas & /types
205
- // it('GET /tables without system tables (explicit)', async () => {
206
- // const res = await axios.get(`${URL}/tables?includeSystemSchemas=false`)
207
- // const isIncluded = res.data.some((x) => `${x.schema}.${x.name}` === 'pg_catalog.pg_type')
208
- // assert.equal(res.status, STATUS.SUCCESS)
209
- // assert.equal(isIncluded, false)
210
- // })
210
+ it ( 'GET /tables without system tables (explicit)' , async ( ) => {
211
+ const res = await axios . get ( `${ URL } /tables?includeSystemSchemas=false` )
212
+ const isIncluded = res . data . some ( ( x ) => `${ x . schema } .${ x . name } ` === 'pg_catalog.pg_type' )
213
+ assert . equal ( res . status , STATUS . SUCCESS )
214
+ assert . equal ( isIncluded , false )
215
+ } )
211
216
it ( 'GET /columns' , async ( ) => {
212
217
const res = await axios . get ( `${ URL } /columns` )
213
218
// console.log('res.data', res.data)
0 commit comments