Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
providenz committed Oct 19, 2024
1 parent 49af27d commit 3cbdf41
Show file tree
Hide file tree
Showing 12 changed files with 1,003 additions and 131 deletions.
2 changes: 1 addition & 1 deletion back/src/__tests__/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ export const formFactory = async ({
...denormalizedSirets,
updatedAt: opt?.updatedAt ?? new Date()
},
include: { forwardedIn: true }
include: { forwardedIn: true, transporters: true }
});

return updated;
Expand Down
4 changes: 3 additions & 1 deletion back/src/bsds/resolvers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { QueryResolvers } from "../../generated/graphql/types";
import bsds from "./queries/bsds";
import { bsdResolver } from "./queries/bsd";
import { Mutation } from "./Mutation";
import controlBsdsResolver from "./queries/controlBsds";

const Query: QueryResolvers = {
bsds,
bsd: bsdResolver
bsd: bsdResolver,
controlBsds: controlBsdsResolver
};

export default { Query, Mutation };
5 changes: 2 additions & 3 deletions back/src/bsds/resolvers/queries/__tests__/bsds.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getFormForElastic, indexForm } from "../../../../forms/elastic";

import { faker } from "@faker-js/faker";

describe("query bsds: governement accoutns permissions", () => {
describe("query bsds: governement accounts permissions", () => {
afterEach(resetDatabase);

it("should allow user authenticated with a token when tied to a government account with relevant perms", async () => {
Expand Down Expand Up @@ -103,8 +103,7 @@ describe("query bsds: governement accoutns permissions", () => {
expect(errors[0].message).toEqual(`Vous n'êtes pas connecté.`);
});

it("should forbid user authenticated with a token if no gov government is associated", async () => {
// the company and owner to build a registry
it("should forbid user authenticated with a token if no government account is associated", async () => {
const { user: owner, company: someCompany } = await userWithCompanyFactory(
"MEMBER"
);
Expand Down
Loading

0 comments on commit 3cbdf41

Please sign in to comment.