github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/ui-v2/tests/unit/helpers/policy/is-management-test.js (about)

     1  import { isManagement } from 'consul-ui/helpers/policy/is-management';
     2  import { module, test } from 'qunit';
     3  
     4  module('Unit | Helper | policy/is-management');
     5  
     6  test('it returns true if the policy is the management policy', function(assert) {
     7    const actual = isManagement([{ ID: '00000000-0000-0000-0000-000000000001' }]);
     8    assert.ok(actual);
     9  });
    10  test("it returns false if the policy isn't the management policy", function(assert) {
    11    const actual = isManagement([{ ID: '00000000-0000-0000-0000-000000000000' }]);
    12    assert.ok(!actual);
    13  });