diff --git a/packages/backend/test/e2e/oauth.ts b/packages/backend/test/e2e/oauth.ts index f5b87b1b2a..ec6e5da711 100644 --- a/packages/backend/test/e2e/oauth.ts +++ b/packages/backend/test/e2e/oauth.ts @@ -659,7 +659,8 @@ describe('OAuth', () => { // "The access token provided is expired, revoked, malformed, or // invalid for other reasons. The resource SHOULD respond with // the HTTP 401 (Unauthorized) status code." - await assertDirectError(createResponse as Response, 401, 'invalid_token'); + assert.strictEqual(createResponse.status, 401); + assert.ok(createResponse.headers.has('WWW-Authenticate')); }); // https://datatracker.ietf.org/doc/html/rfc6749.html#section-3.1.2.4