File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/frontend/servers/y-provider/__tests__ Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,16 @@ describe('Server Tests', () => {
101101 expect ( response . body . error ) . toBe ( 'Forbidden: Invalid API Key' ) ;
102102 } ) ;
103103
104+ test ( 'POST /api/convert-markdown with a Bearer token' , async ( ) => {
105+ const response = await request ( app as any )
106+ . post ( '/api/convert-markdown' )
107+ . set ( 'Origin' , origin )
108+ . set ( 'Authorization' , 'Bearer test-secret-api-key' ) ;
109+
110+ // Warning: Changing the authorization header to Bearer token format will break backend compatibility with this microservice.
111+ expect ( response . status ) . toBe ( 403 ) ;
112+ } ) ;
113+
104114 test ( 'POST /api/convert-markdown with missing body param content' , async ( ) => {
105115 const response = await request ( app as any )
106116 . post ( '/api/convert-markdown' )
You can’t perform that action at this time.
0 commit comments