test: added unit test for file CommonServer/Middleware/UserAuthorization #1919

Closed
opened 2026-04-05 16:38:40 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @beejay141 on 6/3/2023

Title of this pull request?

  • added unit test for file CommonServer/Middleware/UserAuthorization.ts

Small Description?

  • I added unit tests for file UserAuthorization.ts inside directory CommonServer/Middleware directory.
  • The added unit test file is inside CommonServer/Tests/Middleware
  • I refactored function getUserMiddleware inside UserAuthorization.ts. Broken the function down into sub-functions to improve its readability and testability.

Pull Request Checklist:

  • Please make sure all jobs pass before requesting a review.
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).
  • Have you lint your code locally before submission?
  • Did you write tests where appropriate?

closes https://github.com/OneUptime/oneuptime/issues/466

Screenshots (if appropriate):

*Originally created by @beejay141 on 6/3/2023* ### Title of this pull request? - added unit test for file `CommonServer/Middleware/UserAuthorization.ts` ### Small Description? - I added unit tests for file `UserAuthorization.ts` inside directory `CommonServer/Middleware directory`. - The added unit test file is inside `CommonServer/Tests/Middleware` - I refactored function `getUserMiddleware` inside `UserAuthorization.ts`. Broken the function down into sub-functions to improve its readability and testability. ### Pull Request Checklist: - [x] Please make sure all jobs pass before requesting a review. - [x] Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). - [x] Have you lint your code locally before submission? - [x] Did you write tests where appropriate? ### Related Issue? closes https://github.com/OneUptime/oneuptime/issues/466 ### Screenshots (if appropriate):
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1919