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', () => {
101
101
expect ( response . body . error ) . toBe ( 'Forbidden: Invalid API Key' ) ;
102
102
} ) ;
103
103
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
+
104
114
test ( 'POST /api/convert-markdown with missing body param content' , async ( ) => {
105
115
const response = await request ( app as any )
106
116
. post ( '/api/convert-markdown' )
You can’t perform that action at this time.
0 commit comments