mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
rename repository to server repository in server context
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user