diff --git a/test/accountRulesSuite.ts b/test/accountRulesSuite.ts index d928933..cf0b836 100644 --- a/test/accountRulesSuite.ts +++ b/test/accountRulesSuite.ts @@ -774,7 +774,7 @@ export function accountRulesSuite(twoFactor: boolean): void { test('a copied collection: the plugin\'s rule for ITS slug goes in front of every rule it brought; nothing is replaced', async () => { const mk = (slug: string, rule: unknown) => markedStaffRule(rule as () => unknown, slug) const access = { create: mk('agents', staffCreateAccess), delete: mk('agents', staffCreateAccess), read: mk('agents', staffReadAccess), update: mk('agents', staffUpdateAccess('agents')) } - const pluginRoles = () => ({ name: 'roles', type: 'select', options: ['user', 'editor', 'admin'] }) as { access?: { update?: (a: unknown) => unknown }; name: string; options: string[]; type: string } + const pluginRoles = () => ({ name: 'roles', type: 'select', hasMany: true, options: ['user', 'editor', 'admin'] }) as { access?: { update?: (a: unknown) => unknown }; name: string; options: string[]; type: string } const agents = { slug: 'agents', access, auth: true, custom: { ipalAccountRules: { slug: 'agents', applied: Object.keys(access), ownRoles: false }, ipalAccounts: { slug: 'agents', staff: true } }, endpoints: [], fields: [pluginRoles()], hooks: { beforeOperation: [buildPasswordRuleHook()] } } const nobody = () => false const copy = { ...agents, slug: 'copy', endpoints: [], fields: [pluginRoles()] }