github.com/outbrain/consul@v1.4.5/ui-v2/tests/unit/helpers/token/is-anonymous-test.js (about)

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