Skip to content

Commit

Permalink
Merge pull request #530 from salesforcecli/sm/just-nuts-fix
Browse files Browse the repository at this point in the history
test: expect error message is present, but allow additional output
  • Loading branch information
shetzel authored Jan 30, 2023
2 parents 415d94b + 34eeb3f commit 882f971
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/allCommands.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ describe('verifies all commands run successfully ', () => {

it('generates new password for secondary user (onbehalfof) with complexity 7 should thrown an error', () => {
const output = execCmd('org:generate:password -b Other --json -c 7', { ensureExitCode: 1 }).jsonOutput;
expect(output?.message).to.equal('Expected an integer less than or equal to 5 but received: 7');
expect(output?.message).to.include('Expected an integer less than or equal to 5 but received: 7');
});
it('generates new password for secondary user (onbehalfof) with length 7 should thrown an error', () => {
const output = execCmd('org:generate:password -b Other --json -l 7', { ensureExitCode: 1 }).jsonOutput;
expect(output?.message).to.equal('Expected an integer greater than or equal to 8 but received: 7');
expect(output?.message).to.include('Expected an integer greater than or equal to 8 but received: 7');
});
it('assigns 2 permsets to the main user', () => {
const output = execCmd<PermsetAssignResult>('org:assign:permset -n PS2 -n PS3 --json', {
Expand Down
4 changes: 2 additions & 2 deletions test/forceCommands.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ describe('verifies legacy force commands run successfully ', () => {

it('generates new password for secondary user (onbehalfof) with complexity 7 should thrown an error', () => {
const output = execCmd('force:user:password:generate -o Other --json -c 7', { ensureExitCode: 1 }).jsonOutput;
expect(output?.message).to.equal('Expected an integer less than or equal to 5 but received: 7');
expect(output?.message).to.include('Expected an integer less than or equal to 5 but received: 7');
});
it('generates new password for secondary user (onbehalfof) with length 7 should thrown an error', () => {
const output = execCmd('force:user:password:generate -o Other --json -l 7', { ensureExitCode: 1 }).jsonOutput;
expect(output?.message).to.equal('Expected an integer greater than or equal to 8 but received: 7');
expect(output?.message).to.include('Expected an integer greater than or equal to 8 but received: 7');
});
it('assigns 2 permsets to the main user', () => {
const output = execCmd<PermsetAssignResult>('force:user:permset:assign -n PS2,PS3 --json', {
Expand Down

0 comments on commit 882f971

Please sign in to comment.