import { UserSession } from '@notifire/testing' ; import { expect } from 'chai' ; describe ( 'Get Signed Url - /storage/upload-url (GET)' , function ( ) { let session ; beforeEach ( async ( ) => { session = new UserSession ( ) ; await session . initialize ( ) ; } ) ; it ( 'should return an S3 signed URL' , async function ( ) { const { body : { data } , } = await session . testAgent . get ( '/v1/storage/upload-url?extension=jpg' ) ; expect ( data . path ) . to . contain ( '.jpg' ) ; expect ( data . signedUrl ) . to . contain ( '.jpg' ) ; expect ( data . signedUrl ) . to . contain ( `${ session . organization . _id }/${ session . application . _id }` ) ; } ) ; } ) ;