2020-08-26 15:44:50 -07:00
|
|
|
import getActorFromUrn from '@datahub/data-models/utils/get-actor-from-urn';
|
2019-08-31 20:51:14 -07:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
|
|
|
|
module('Unit | Utility | get-actor-from-urn', function() {
|
2020-08-26 15:44:50 -07:00
|
|
|
test('it works as intended', function(assert): void {
|
2019-08-31 20:51:14 -07:00
|
|
|
const sampleUrn = 'urn:li:corpuser:pikachu';
|
|
|
|
let result = getActorFromUrn(sampleUrn);
|
|
|
|
assert.ok(result === 'pikachu', 'Response as expected');
|
|
|
|
|
|
|
|
const sampleBadUrn = 'somethingsomethingdarkside';
|
|
|
|
result = getActorFromUrn(sampleBadUrn);
|
|
|
|
assert.ok(result === sampleBadUrn, 'No change as expected if given bad urn');
|
|
|
|
});
|
|
|
|
});
|