@@ -99,6 +99,12 @@ describe('/schemas', () => {
9999 assert . equal ( true , ! ! datum )
100100 assert . equal ( true , ! ! included )
101101 } )
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+ } )
102108 it ( 'POST & PATCH & DELETE' , async ( ) => {
103109 const res = await axios . post ( `${ URL } /schemas` , { name : 'api' } )
104110 assert . equal ( 'api' , res . data . name )
@@ -201,13 +207,12 @@ describe('/tables', async () => {
201207 assert . equal ( res . status , STATUS . SUCCESS )
202208 assert . equal ( true , ! ! included )
203209 } )
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+ } )
211216 it ( 'GET /columns' , async ( ) => {
212217 const res = await axios . get ( `${ URL } /columns` )
213218 // console.log('res.data', res.data)
0 commit comments