mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
7d89e519a2
UI to accompany the new ACLs APIs
14 lines
543 B
JavaScript
14 lines
543 B
JavaScript
import { isAnonymous } from 'consul-ui/helpers/token/is-anonymous';
|
|
import { module, test } from 'qunit';
|
|
|
|
module('Unit | Helper | token/is-anonymous');
|
|
|
|
test('it returns true if the token is the anonymous token', function(assert) {
|
|
const actual = isAnonymous([{ AccessorID: '00000000-0000-0000-0000-000000000002' }]);
|
|
assert.ok(actual);
|
|
});
|
|
test("it returns false if the token isn't the anonymous token", function(assert) {
|
|
const actual = isAnonymous([{ AccessorID: '00000000-0000-0000-0000-000000000000' }]);
|
|
assert.ok(!actual);
|
|
});
|