Skip to content

test+feat: unit tests for audit-log/reporting/grading services + notification-preferences indexes - #1360

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
bobaivigitalpoint-ui:fix/issues-1248-1261-1264-1266
Aug 27, 2026
Merged

test+feat: unit tests for audit-log/reporting/grading services + notification-preferences indexes#1360
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
bobaivigitalpoint-ui:fix/issues-1248-1261-1264-1266

Conversation

@bobaivigitalpoint-ui

Copy link
Copy Markdown
Contributor

Summary

Resolves four assigned issues in a single PR.

Changes

  • Add unit tests for audit-log service #1264src/audit-log/audit-log.service.spec.ts: unit tests covering all public methods of the AuditLogService facade (log, logAuth, logDataChange, logApiAccess, logSecurityEvent, search, findAll, findByUser, findByAction, findByEntity, findByIpAddress, findByDateRange, generateReport, getStatistics, applyRetentionPolicy, exportToJson, exportToCsv)
  • Add unit tests for audit-reporting service #1266src/audit-log/services/audit-reporting.service.spec.ts: unit tests for AuditReportingService covering generateReport (zero totals, aggregations, top-users mapping, Unknown email fallback) and getStatistics (parallel counts, correct severity filters)
  • Add unit tests for grading service #1261src/assessment/grading/grading.service.spec.ts: unit tests for GradingService covering gradeSubmission (score mismatch, unknown criterion, duplicate criterion, missing level/points, point capping, levelId resolution, missing attempt) and autoGradeSubmission (not enabled, missing default level, happy path) and findByAttempt (found, not found)
  • Add database indexes to the notification-preferences entity #1248@Index decorators added to notification-preferences.entity.ts (userId, globalUnsubscribe) plus migration 1800000000000-add-notification-preferences-indexes.ts to create the indexes on existing databases

CI

  • Lint: 0 errors ✅
  • TypeScript typecheck: clean ✅
  • Build: passes ✅
  • migrations:check: all 33 files pass ✅

Closes #1264
Closes #1266
Closes #1261
Closes #1248

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@bobaivigitalpoint-ui Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit dbfb174 into rinafcode:main Aug 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants