rename repository to server repository in server context

This commit is contained in:
2025-03-27 10:38:02 -07:00
parent bba00eb067
commit bda46d6808
18 changed files with 128 additions and 148 deletions

View File

@@ -15,7 +15,7 @@ describe("QueryResolvers", () => {
async function addMockSystems() {
const systems = generateMockSystems();
await Promise.all(systems.map(async (system) => {
await context.repository.addOrUpdateSystem(system);
await context.shuttleRepository.addOrUpdateSystem(system);
}));
return systems;
}
@@ -36,9 +36,8 @@ describe("QueryResolvers", () => {
const response = await holder.testServer.executeOperation({
query,
}, {
contextValue: {
repository: context.repository,
},
contextValue: context
});
assert(response.body.kind === "single");
@@ -68,9 +67,8 @@ describe("QueryResolvers", () => {
id: systemToGet.id,
}
}, {
contextValue: {
repository: context.repository,
}
contextValue: context
});
assert(response.body.kind === "single");
@@ -85,9 +83,8 @@ describe("QueryResolvers", () => {
id: "nonexistent-id",
}
}, {
contextValue: {
repository: context.repository,
}
contextValue: context
});
assert(response.body.kind === "single");
@@ -106,8 +103,8 @@ describe("QueryResolvers", () => {
it("returns correct data if the notification is scheduled", async () => {
// Arrange
const shuttle = await addMockShuttleToRepository(context.repository, "1");
const stop = await addMockStopToRepository(context.repository, "1")
const shuttle = await addMockShuttleToRepository(context.shuttleRepository, "1");
const stop = await addMockStopToRepository(context.shuttleRepository, "1")
const notification: NotificationSchedulingArguments = {
shuttleId: shuttle.id,