@@ -174,6 +174,11 @@ describe('/functions', () => {
174174 query : `CREATE SCHEMA IF NOT EXISTS test_schema;` ,
175175 } )
176176 } )
177+ after ( async ( ) => {
178+ await axios . post ( `${ URL } /query` , {
179+ query : `DROP SCHEMA test_schema;` ,
180+ } )
181+ } )
177182 it ( 'GET' , async ( ) => {
178183 const res = await axios . get ( `${ URL } /functions` )
179184 // console.log('res.data', res.data)
@@ -212,9 +217,7 @@ describe('/functions', () => {
212217 it ( 'PATCH' , async ( ) => {
213218 const updates = {
214219 name : 'test_func_renamed' ,
215- params : [ 'integer' , 'integer' ] ,
216220 schema : 'test_schema' ,
217- // extension: 'mathlib', // TODO: test patching function extension
218221 }
219222
220223 let { data : updated } = await axios . patch ( `${ URL } /functions/${ func . id } ` , updates )
@@ -227,9 +230,6 @@ describe('/functions', () => {
227230 const { data : functions } = await axios . get ( `${ URL } /functions` )
228231 const stillExists = functions . some ( ( x ) => func . id === x . id )
229232 assert . equal ( stillExists , false , 'Function is deleted' )
230- await axios . post ( `${ URL } /query` , {
231- query : `DROP SCHEMA test_schema;` ,
232- } )
233233 } )
234234} )
235235
0 commit comments