fixed seeker-fast specs missing wanted list stubs

This commit is contained in:
Flaminel committed 2026-10-20 15:55:54 +03:00
1 parent 265b166587
commit c7b787bdfd
2 files changed
+14

No files matched your search

+11
View File
@@ -218,6 +218,17 @@ export function arrMoviesStub(movies: SearchableMovie[]): Mapping {
};
}
/** Serves one page of a Radarr wanted list. */
export function arrWantedStub(kind: 'missing' | 'cutoff', records: Array<{ id: number }>): Mapping {
return {
request: { method: 'GET', urlPath: `/api/v3/wanted/${kind}` },
response: {
status: 200,
jsonBody: { page: 1, pageSize: records.length, totalRecords: records.length, records },
},
};
}
export function arrQualityProfilesStub(): Mapping {
return {
request: { method: 'GET', urlPath: '/api/v3/qualityprofile' },
@@ -10,6 +10,7 @@ import {
arrCommandTriggerStub,
arrMoviesStub,
arrQualityProfilesStub,
arrWantedStub,
} from '../helpers/mocks/arr-stubs';
const COMMAND_ID = 4242;
@@ -58,6 +59,8 @@ async function arrangeSearchableInstance(
await applyArrDefaults(mocks.arr);
await mocks.arr.stubMany([
arrMoviesStub([{ id: 1, title: movieTitle }]),
arrWantedStub('missing', [{ id: 1 }]),
arrWantedStub('cutoff', []),
arrQualityProfilesStub(),
arrCommandTriggerStub(COMMAND_ID),
...commandStubs,