Skip to content

Commit

Permalink
backport of commit 7939bb8
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Jul 11, 2022
1 parent 72f5129 commit 28bf64c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ui/tests/unit/abilities/job-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,18 @@ module('Unit | Ability | job', function (hooks) {
this.owner.register('service:token', mockToken);

assert.ok(
this.can.cannot('run job', null, { namespace: 'production-web' })
this.can.can(
'run job',
null,
{ namespace: 'production-web' },
'The existence of a single namespace where a job can be run means that can run is enabled'
)
);
assert.ok(this.can.can('run job', null, { namespace: 'production-api' }));
assert.ok(this.can.can('run job', null, { namespace: 'production-other' }));
assert.ok(
this.can.can('run job', null, { namespace: 'something-suffixed' })
);
assert.ok(
this.can.cannot('run job', null, {
namespace: 'something-more-suffixed',
}),
'expected the namespace with the greatest number of matched characters to be chosen'
);
assert.ok(
this.can.can('run job', null, { namespace: '000-abc-999' }),
'expected to be able to match against more than one wildcard'
Expand Down

0 comments on commit 28bf64c

Please sign in to comment.