Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/home/services/home.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const getReadinessStatus = () => {
checks.push({
category: 'mail',
status: mailConfigured ? 'ok' : 'warning',
message: mailConfigured ? 'Mail provider configured' : 'No mail provider configured',
message: mailConfigured ? 'Mail provider configured' : 'No mail provider configured — users register without email verification',
});

// billing — Stripe
Expand Down
19 changes: 19 additions & 0 deletions modules/home/tests/home.service.unit.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ describe('HomeService.getReadinessStatus unit tests:', () => {
expect(categories).not.toContain('monitoring');
});

describe('mail row', () => {
test('warning message states the consequence when no mail provider is configured', async () => {
const HomeService = await withConfig({});
const checks = HomeService.getReadinessStatus();
const row = checks.find((c) => c.category === 'mail');
expect(row.status).toBe('warning');
expect(row.message).toBe('No mail provider configured — users register without email verification');
});

test('ok message is unchanged when a mail provider is configured', async () => {
mockMailerIsConfigured.mockReturnValue(true);
const HomeService = await withConfig({});
const checks = HomeService.getReadinessStatus();
const row = checks.find((c) => c.category === 'mail');
expect(row.status).toBe('ok');
expect(row.message).toBe('Mail provider configured');
});
});

describe('errorTracking row', () => {
test('ok when analytics.posthog.key is set AND errorTracking=true', async () => {
const HomeService = await withConfig({
Expand Down
Loading