mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 07:07:31 +00:00
refactor(server): keep the fixes within the size and strict ratchets
The admin settings audit summary moves to auth.helpers, the booking stay check to DayAccommodationsRepository.idOnTrip, the strict typings declare the MCP SDK types module, and the useAdmin test leaves the format baseline.
This commit is contained in:
@@ -106,6 +106,9 @@ describe('DayAccommodationsRepository — fully seeded world', () => {
|
||||
const { trip, named, otherStay } = await seed();
|
||||
expect(await repo.existsInTrip(named.id, trip.id)).toBe(true);
|
||||
expect(await repo.existsInTrip(otherStay.id, trip.id)).toBe(false);
|
||||
expect(await repo.idOnTrip(named.id, trip.id)).toBe(named.id);
|
||||
expect(await repo.idOnTrip(otherStay.id, trip.id)).toBeNull();
|
||||
expect(await repo.idOnTrip(null, trip.id)).toBeNull();
|
||||
expect(await repo.getCheckIn(named.id)).toBe('15:00');
|
||||
expect(await repo.getTripId(named.id)).toBe(trip.id);
|
||||
expect(await repo.getTripId(999999)).toBeUndefined();
|
||||
|
||||
@@ -305,7 +305,7 @@ beforeAll(async () => {
|
||||
(await sharedTestOrm(testDb)).em,
|
||||
new SettingsService(await createTestUnitOfWork(testDb), await createTestAppSettingsRepo(testDb), await createTestSettingsRepo(testDb), membership.get(TripMembershipService)), { copyOverrides: async () => {} } as never,
|
||||
);
|
||||
membersSvc = new TripMembersService(budgetSvc, new UserCleanupService(new MaintenanceRepository(dbsEm!), budgetSvc, await createTestUnitOfWork(testDb), await createTestUsersRepo(testDb), await createTestTripMembersRepo(testDb), await createTestBudgetItemsRepo(testDb), await createTestBudgetSettlementsRepo(testDb), await createTestJourneyShareTokensRepo(testDb), await createTestJourneysRepo(testDb), await createTestJourneyEntriesRepo(testDb), await createTestJourneyContributorsRepo(testDb), await createTestShareTokensRepo(testDb), await createTestPluginsRepo(testDb), await createTestPluginUserErasureQueueRepo(testDb), { releaseValues: async () => [] } as never, { handToTripOwners: async () => {} } as never), new PermissionsService(await createTestAppSettingsRepo(testDb), await createTestUnitOfWork(testDb)), realtime, notificationsStub(), await createTestUnitOfWork(testDb), await createTestTripsRepo(testDb), await createTestTripMembersRepo(testDb), await createTestUsersRepo(testDb));
|
||||
membersSvc = new TripMembersService(budgetSvc, new UserCleanupService(new MaintenanceRepository(dbsEm!), budgetSvc, await createTestUnitOfWork(testDb), await createTestUsersRepo(testDb), await createTestTripMembersRepo(testDb), await createTestBudgetItemsRepo(testDb), await createTestBudgetSettlementsRepo(testDb), await createTestJourneyShareTokensRepo(testDb), await createTestJourneysRepo(testDb), await createTestJourneyEntriesRepo(testDb), await createTestJourneyContributorsRepo(testDb), await createTestShareTokensRepo(testDb), await createTestPluginsRepo(testDb), await createTestPluginUserErasureQueueRepo(testDb), {} as never, {} as never), new PermissionsService(await createTestAppSettingsRepo(testDb), await createTestUnitOfWork(testDb)), realtime, notificationsStub(), await createTestUnitOfWork(testDb), await createTestTripsRepo(testDb), await createTestTripMembersRepo(testDb), await createTestUsersRepo(testDb));
|
||||
readModelSvc = new TripReadModelService(
|
||||
await createTestTripsRepo(testDb), membersSvc, daysSvc, accommodationsSvc, budgetSvc,
|
||||
new PackingService(
|
||||
|
||||
Reference in New Issue
Block a user