mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 23:58:36 -05:00
Move app to apps/web-react in pnpm workspace layout
This commit is contained in:
20
apps/web-react/app/features/team/tests/fixtures.ts
Normal file
20
apps/web-react/app/features/team/tests/fixtures.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { REGULAR_USER_TEST_ID } from "~/db/seed/constants";
|
||||
import * as TeamFactory from "~/db/seed/factories/TeamFactory";
|
||||
import { ADMIN_ID } from "~/features/admin/admin-constants";
|
||||
|
||||
/** A team the regular user owns, so acting as "regular" exercises the owner paths. */
|
||||
export const createTeamOwnedByRegular = (name: string, isMainTeam = true) =>
|
||||
TeamFactory.create({
|
||||
name,
|
||||
isMainTeam,
|
||||
memberUserIds: [REGULAR_USER_TEST_ID],
|
||||
});
|
||||
|
||||
/** A team the regular user is a member but not the owner of. */
|
||||
export const createTeamWithRegularMember = (
|
||||
overrides: Partial<Parameters<typeof TeamFactory.create>[0]> = {},
|
||||
) =>
|
||||
TeamFactory.create({
|
||||
memberUserIds: [ADMIN_ID, REGULAR_USER_TEST_ID],
|
||||
...overrides,
|
||||
});
|
||||
Reference in New Issue
Block a user