Skip to content

Commit

Permalink
test: nut for multiple psl assigns
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Feb 23, 2024
1 parent 28f9f5d commit eba69ac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/commands/permsetlicense/assign.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ describe('PermissionSetLicense tests', () => {
});
});

describe('assign multiple PSLs to default user', () => {
it('2 successful assignments', () => {
const consolePSL = 'Sales Console User';
const commandResult = execCmd<PSLResult>(`org:assign:permsetlicense -n ${testPSL} -n "${consolePSL}" --json`, {
ensureExitCode: 0,
}).jsonOutput as { status: number; result: PSLResult; warnings: string[] };
expect(commandResult.result.failures).to.be.an('array').with.length(0);
expect(commandResult.result.successes.some((success) => success.value === testPSL)).to.be.true;
expect(commandResult.result.successes.some((success) => success.value === consolePSL)).to.be.true;
// warning because already assigned
expect(commandResult.warnings).to.be.an('array').with.length(1);
expect(commandResult.warnings[0]).to.include(testPSL);
});
});

describe('assign PSL to multiple users via onBehalfOf', () => {
it('assigns a psl to multiple users via onBehalfOf', () => {
const anotherPSL = 'SurveyCreatorPsl';
Expand Down

0 comments on commit eba69ac

Please sign in to comment.