mirror of
https://github.com/FJurmanovic/sugarr.git
synced 2026-11-11 15:51:09 +00:00
Add Health/Recommendations/Request/Webhook controllers
This commit is contained in:
15
test/app/controllers/HealthController.test.ts
Normal file
15
test/app/controllers/HealthController.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import Fastify from 'fastify';
|
||||
import { HealthController } from '../../../src/app/controllers/HealthController';
|
||||
import type { AppConfig } from '../../../src/app/config/AppConfig';
|
||||
|
||||
describe('HealthController', () => {
|
||||
it('reports status ok with llm/radarr flags from config', async () => {
|
||||
const app = Fastify();
|
||||
new HealthController({ LLM_ENABLED: true, RADARR_ENABLED: false } as AppConfig).register(app);
|
||||
|
||||
const res = await app.inject({ method: 'GET', url: '/health' });
|
||||
expect(res.statusCode).toBe(200);
|
||||
expect(res.json()).toEqual({ status: 'ok', llm: true, radarr: false });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user