open-consul/ui-v2/tests/unit/helpers/policy/is-management-test.js
John Cowen d7655ea356 ui: Prefer using notOk(actual) instead of ok(!actual) in tests (#4925)
And make sure its consistent throughout the app
2019-05-01 18:21:37 +00:00

14 lines
542 B
JavaScript

import { isManagement } from 'consul-ui/helpers/policy/is-management';
import { module, test } from 'qunit';
module('Unit | Helper | policy/is-management');
test('it returns true if the policy is the management policy', function(assert) {
const actual = isManagement([{ ID: '00000000-0000-0000-0000-000000000001' }]);
assert.ok(actual);
});
test("it returns false if the policy isn't the management policy", function(assert) {
const actual = isManagement([{ ID: '00000000-0000-0000-0000-000000000000' }]);
assert.notOk(actual);
});