@@ -174,6 +174,11 @@ describe('/functions', () => {
174
174
query : `CREATE SCHEMA IF NOT EXISTS test_schema;` ,
175
175
} )
176
176
} )
177
+ after ( async ( ) => {
178
+ await axios . post ( `${ URL } /query` , {
179
+ query : `DROP SCHEMA test_schema;` ,
180
+ } )
181
+ } )
177
182
it ( 'GET' , async ( ) => {
178
183
const res = await axios . get ( `${ URL } /functions` )
179
184
// console.log('res.data', res.data)
@@ -212,9 +217,7 @@ describe('/functions', () => {
212
217
it ( 'PATCH' , async ( ) => {
213
218
const updates = {
214
219
name : 'test_func_renamed' ,
215
- params : [ 'integer' , 'integer' ] ,
216
220
schema : 'test_schema' ,
217
- // extension: 'mathlib', // TODO: test patching function extension
218
221
}
219
222
220
223
let { data : updated } = await axios . patch ( `${ URL } /functions/${ func . id } ` , updates )
@@ -227,9 +230,6 @@ describe('/functions', () => {
227
230
const { data : functions } = await axios . get ( `${ URL } /functions` )
228
231
const stillExists = functions . some ( ( x ) => func . id === x . id )
229
232
assert . equal ( stillExists , false , 'Function is deleted' )
230
- await axios . post ( `${ URL } /query` , {
231
- query : `DROP SCHEMA test_schema;` ,
232
- } )
233
233
} )
234
234
} )
235
235
0 commit comments